Skip Menu |

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

Report information
The Basics
Id: 73416
Status: new
Priority: 0/
Queue: Text-Balanced

People
Owner: Nobody in particular
Requestors: florent.angly [...] gmail.com
Cc:
AdminCc:

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



Subject: Bug when extracting 4 delimited fields
I have observed a weird behaviour when extracting strings (with extract_multiple and extract_delimited) that is supposed to contain 4 fields: only 3 are returned. The same test with 3 or 5 fields produces the expected results though. A test script is attached. Florent
Subject: balanced_test.pl
#! /usr/bin/env perl use strict; use warnings; use Data::Dumper; use Text::Balanced qw(extract_multiple extract_delimited); my $value; my @arr; $value = "1 1 1"; print "value: '$value'\n"; @arr = extract_multiple( $value, [sub { extract_delimited($_[0],q{ '"}) },] ); print Dumper(\@arr)."\n"; $value = "1 1 1 1"; print "value: '$value'\n"; @arr = extract_multiple( $value, [sub { extract_delimited($_[0],q{ '"}) },] ); print Dumper(\@arr)."\n"; $value = "1 1 1 1 1"; print "value: '$value'\n"; @arr = extract_multiple( $value, [sub { extract_delimited($_[0],q{ '"}) },] ); print Dumper(\@arr)."\n"; exit;