From: Rafael Garcia-Suarez Date: Thu, 21 Dec 2006 10:24:05 +0000 (+0000) Subject: Upgrade to Text::Balanced 2.0.0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0c793b6f00b278111ed6958bc7f2b834f3da392c;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Text::Balanced 2.0.0 p4raw-id: //depot/perl@29609 --- diff --git a/lib/Text/Balanced.pm b/lib/Text/Balanced.pm index 49d4217..7316cc8 100644 --- a/lib/Text/Balanced.pm +++ b/lib/Text/Balanced.pm @@ -10,7 +10,7 @@ use Exporter; use SelfLoader; use vars qw { $VERSION @ISA %EXPORT_TAGS }; -use version; $VERSION = qv('1.99.1_1'); +use version; $VERSION = qv('2.0.0'); @ISA = qw ( Exporter ); %EXPORT_TAGS = ( ALL => [ qw( @@ -793,13 +793,15 @@ sub _match_quotelike($$$$) # ($textref, $prepat, $allow_raw_match) $rdel1 =~ tr/[({/; defined(_match_bracketed($textref,"",$ldel1,"","",$rdel1)) || do { pos $$textref = $startpos; return }; + $ld2pos = pos($$textref); + $rd1pos = $ld2pos-1; } else { - $$textref =~ /$ldel1[^\\$ldel1]*(\\.[^\\$ldel1]*)*$ldel1/gcs + $$textref =~ /\G$ldel1[^\\$ldel1]*(\\.[^\\$ldel1]*)*$ldel1/gcs || do { pos $$textref = $startpos; return }; + $ld2pos = $rd1pos = pos($$textref)-1; } - $ld2pos = $rd1pos = pos($$textref)-1; my $second_arg = $op =~ /s|tr|y/ ? 1 : 0; if ($second_arg) diff --git a/lib/Text/Balanced/Changes b/lib/Text/Balanced/Changes index 159c8c3..49957dc 100644 --- a/lib/Text/Balanced/Changes +++ b/lib/Text/Balanced/Changes @@ -331,3 +331,12 @@ Revision history for Perl extension Text::Balanced. 1.99.1 Thu Nov 16 09:29:14 2006 + - Included dependency on version.pm (thanks Andy) + + + +2.0.0 Wed Dec 20 10:50:24 2006 + + - Added patches from bleadperl version (thanks Rafael!) + + - Fixed bug in second bracketed delimiters (thanks David) diff --git a/lib/Text/Balanced/README b/lib/Text/Balanced/README index 4f19258..386bd5a 100755 --- a/lib/Text/Balanced/README +++ b/lib/Text/Balanced/README @@ -1,4 +1,4 @@ -Text::Balanced version 1.99.1 +Text::Balanced version 2.0.0 Text::Balanced - Extract delimited text sequences from strings. diff --git a/lib/Text/Balanced/t/extqlk.t b/lib/Text/Balanced/t/extqlk.t index 0129cd0..97dc517 100644 --- a/lib/Text/Balanced/t/extqlk.t +++ b/lib/Text/Balanced/t/extqlk.t @@ -23,7 +23,7 @@ $count=2; use vars qw( $DEBUG ); #$DEBUG=1; sub debug { print "\t>>>",@_ if $ENV{DEBUG} } -sub esc { my $x = shift; $x =~ s/\n/\\n/gs; $x } +sub esc { my $x = shift||''; $x =~ s/\n/\\n/gs; $x } ######################### End of black magic.