Skip Menu |
 

This queue is for tickets about the Text-Balanced CPAN distribution.

Report information
The Basics
Id: 16755
Status: resolved
Priority: 0/
Queue: Text-Balanced

People
Owner: Nobody in particular
Requestors: cadir.lee [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 1.97



Subject: FIX: extract_multiple returns garbage unknown when a prefix has length and there are no unknown characters
Download (untitled) / with headers
text/plain 758b
Attached is a fix to 1.95. If an extractor is used, there are no unknown characters, and a prefix is pulled, the unknown contents are incorrectly evaluated. The $unkpos indicates the start of the unknown region. The bug is that this is set to the current position (after the extractor match) and then the clause in "$lastpos-$unkpos" ends up being negative which leads to unexpected results. The correct behavior (attached) is to set $unkpos to $lastpos. PERL VERSION: This is perl, v5.8.6 built for MSWin32-x86-multi-thread (with 3 registered patches, see perl -V for more detail) Copyright 1987-2004, Larry Wall Binary build 811 provided by ActiveState Corp. http://www.ActiveState.com ActiveState is a division of Sophos. Built Dec 13 2004 09:52:01
Download diff.txt
text/plain 539b
*** Balanced.pm.orig Thu Dec 22 17:41:22 2005 --- Balanced.pm Tue Dec 27 15:34:30 2005 *************** *** 930,936 **** if (defined($field) && length($field)) { if (!$igunk) { ! $unkpos = pos $$textref if length($pref) && !defined($unkpos); if (defined $unkpos) { --- 930,936 ---- if (defined($field) && length($field)) { if (!$igunk) { ! $unkpos = $lastpos if length($pref) && !defined($unkpos); if (defined $unkpos) {
This was fixed in 1.97.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.