diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-12-21 10:24:05 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-12-21 10:24:05 +0000 |
commit | 0c793b6f00b278111ed6958bc7f2b834f3da392c (patch) | |
tree | 480df403b0a0d644b59c41485052319a16b354cc /lib/Text | |
parent | 8718f9a1b30f0e2dc3598c478b0edf7f5b51c660 (diff) | |
download | perl-0c793b6f00b278111ed6958bc7f2b834f3da392c.tar.gz |
Upgrade to Text::Balanced 2.0.0
p4raw-id: //depot/perl@29609
Diffstat (limited to 'lib/Text')
-rw-r--r-- | lib/Text/Balanced.pm | 8 | ||||
-rw-r--r-- | lib/Text/Balanced/Changes | 9 | ||||
-rwxr-xr-x | lib/Text/Balanced/README | 2 | ||||
-rw-r--r-- | lib/Text/Balanced/t/extqlk.t | 2 |
4 files changed, 16 insertions, 5 deletions
diff --git a/lib/Text/Balanced.pm b/lib/Text/Balanced.pm index 49d4217cc3..7316cc83ff 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 159c8c3186..49957dc61c 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 4f1925820b..386bd5ac78 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 0129cd0ba5..97dc517c54 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||'<undef>'; $x =~ s/\n/\\n/gs; $x } ######################### End of black magic. |