Change 30165 by [EMAIL PROTECTED] on 2007/02/07 22:21:00

        Integrate:
        [ 22821]
        make Text::Balanced skip "case /..../" correctly for Switch.pm
        
        [ 25134]
        Subject: [PATCH] #2 try at Text::Balanced patch and maintainership
        From: Tels <[EMAIL PROTECTED]>
        Date: Sat, 9 Jul 2005 23:10:29 +0200
        Message-Id: <[EMAIL PROTECTED]>
        
        (with minor tweaks)
        
        [ 25135]
        Subject: Re: [perl #25157] [PATCH] Text-Balanced extract_quotelike 
fails on certain delims in HERE docs
        From: David Manura <[EMAIL PROTECTED]>
        Date: Wed, 21 Jan 2004 20:59:27 -0500
        Message-ID: <[EMAIL PROTECTED]>
        
        Fixes perl #25151, 25154, 25156, 25157, 25158 using jumbo patch
        included in perl #25157.
        
        [ 28105]
        Upgrade to Text-Balanced-1.98
        
        [ 28125]
        Rollback two changes in Text::Balanced which cause test failures in the
        CPAN and bleadperl version of the tests.  Also, the previous bleadperl
        version of one test file is a bit more comprehensive than what was in
        CPAN, so it has been completely restored.
        
        [ 28126]
        Version bump and typo fix from change #28125.
        
        [ 28127]
        Rename lib/Text/Balanced/t/00.load.t to 
        lib/Text/Balanced/t/00-load.t and restore a test to 
        lib/Text/Balanced/t/extmul.t.
        
        [ 28270]
        Silence Text::Balanced's 00-load.t when PERL_CORE is defined.
        
        [ 28287]
        Fix a syntax error in test
        
        [ 29344]
        Sync Text::Balanced with the CPAN version (1.99.1)
        
        [ 29345]
        - Restore two Text::Balanced tests, more comprehensive in bleadperl than
          in CPAN.
        - Restore a local bugfix, tested by the above tests.
        - Fix a few typos in the POD for Text::Balanced
        - Bump version of Text::Balanced
        
        [ 29346]
        Remove tests for POD or POD coverage -- they're always skipped.
        
        [ 29609]
        Upgrade to Text::Balanced 2.0.0

Affected files ...

... //depot/maint-5.8/perl/MANIFEST#307 integrate
... //depot/maint-5.8/perl/lib/Test/Harness/t/pod.t#4 delete
... //depot/maint-5.8/perl/lib/Text/Balanced.pm#3 integrate
... //depot/maint-5.8/perl/lib/Text/Balanced/Changes#3 integrate
... //depot/maint-5.8/perl/lib/Text/Balanced/README#3 integrate
... //depot/maint-5.8/perl/lib/Text/Balanced/t/00-load.t#1 branch
... //depot/maint-5.8/perl/lib/Text/Balanced/t/00.load.t#1 branch
... //depot/maint-5.8/perl/lib/Text/Balanced/t/extcbk.t#3 integrate
... //depot/maint-5.8/perl/lib/Text/Balanced/t/extmul.t#2 integrate
... //depot/maint-5.8/perl/lib/Text/Balanced/t/extqlk.t#2 integrate
... //depot/maint-5.8/perl/lib/Text/Balanced/t/exttag.t#2 integrate
... //depot/maint-5.8/perl/lib/Text/Balanced/t/extvar.t#3 integrate
... //depot/maint-5.8/perl/lib/Text/Balanced/t/gentag.t#3 integrate
... //depot/maint-5.8/perl/lib/Text/Balanced/t/pod-coverage.t#1 branch
... //depot/maint-5.8/perl/lib/Text/Balanced/t/pod.t#1 branch

Differences ...

==== //depot/maint-5.8/perl/MANIFEST#307 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST#306~30139~    2007-02-05 13:19:54.000000000 -0800
+++ perl/MANIFEST       2007-02-07 14:21:00.000000000 -0800
@@ -1901,7 +1901,6 @@
 lib/Test/Harness/t/inc_taint.t Test::Harness test
 lib/Test/Harness/t/nonumbers.t Test::Harness test
 lib/Test/Harness/t/ok.t                Test::Harness test
-lib/Test/Harness/t/pod.t       Test::Harness test
 lib/Test/Harness/t/point-parse.t       Test::Harness test
 lib/Test/Harness/t/point.t     Test::Harness test
 lib/Test/Harness/t/prove-globbing.t    Test::Harness::Straps test
@@ -1995,6 +1994,7 @@
 lib/Text/Balanced/Changes      Text::Balanced
 lib/Text/Balanced.pm           Text::Balanced
 lib/Text/Balanced/README       Text::Balanced
+lib/Text/Balanced/t/00-load.t  See if Text::Balanced works
 lib/Text/Balanced/t/extbrk.t   See if Text::Balanced works
 lib/Text/Balanced/t/extcbk.t   See if Text::Balanced works
 lib/Text/Balanced/t/extdel.t   See if Text::Balanced works
@@ -2003,6 +2003,7 @@
 lib/Text/Balanced/t/exttag.t   See if Text::Balanced works
 lib/Text/Balanced/t/extvar.t   See if Text::Balanced works
 lib/Text/Balanced/t/gentag.t   See if Text::Balanced works
+lib/Text/Balanced/t/pod.t      See if Text::Balanced works
 lib/Text/ParseWords.pm         Perl module to split words on arbitrary 
delimiter
 lib/Text/ParseWords.t          See if Text::ParseWords works
 lib/Text/ParseWords/taint.t    See if Text::ParseWords works with tainting

==== //depot/maint-5.8/perl/lib/Text/Balanced.pm#3 (text) ====
Index: perl/lib/Text/Balanced.pm
--- perl/lib/Text/Balanced.pm#2~19991~  2003-07-04 06:54:33.000000000 -0700
+++ perl/lib/Text/Balanced.pm   2007-02-07 14:21:00.000000000 -0800
@@ -10,7 +10,10 @@
 use SelfLoader;
 use vars qw { $VERSION @ISA %EXPORT_TAGS };
 
-$VERSION = '1.95';
+# I really don't want to bring the XS version module into maint. So for now,
+# I'm commiting the sin of Bowdlerising Damian's module:
+# use version; $VERSION = qv('2.0.0');
+$VERSION = 2.000000;
 @ISA           = qw ( Exporter );
                     
 %EXPORT_TAGS   = ( ALL => [ qw(
@@ -48,7 +51,7 @@
 {
        my ($wantarray, $textref, $message, $pos) = @_;
        _failmsg $message, $pos if $message;
-       return ("",$$textref,"") if $wantarray;
+       return (undef,$$textref,undef) if $wantarray;
        return undef;
 }
 
@@ -57,7 +60,7 @@
        $@ = undef;
        my ($wantarray,$textref) = splice @_, 0, 2;
        my ($extrapos, $extralen) = @_>18 ? splice(@_, -2, 2) : (0,0);
-       my ($startlen) = $_[5];
+       my ($startlen, $oppos) = @_[5,6];
        my $remainderpos = $_[2];
        if ($wantarray)
        {
@@ -67,7 +70,7 @@
                        push @res, substr($$textref,$from,$len);
                }
                if ($extralen) {        # CORRECT FILLET
-                       my $extra = substr($res[0], $extrapos-$startlen, 
$extralen, "\n");
+                       my $extra = substr($res[0], $extrapos-$oppos, 
$extralen, "\n");
                        $res[1] = "$extra$res[1]";
                        eval { substr($$textref,$remainderpos,0) = $extra;
                               substr($$textref,$extrapos,$extralen,"\n")} ;
@@ -266,7 +269,7 @@
               );
 }
 
-sub revbracket($)
+sub _revbracket($)
 {
        my $brack = reverse $_[0];
        $brack =~ tr/[({</])}>/;
@@ -328,8 +331,8 @@
 
        if (!defined $rdel)
        {
-               $rdelspec = $&;
-               unless ($rdelspec =~ s/\A([[(<{]+)($XMLNAME).*/ quotemeta 
"$1\/$2". revbracket($1) /oes)
+               $rdelspec = substr($$textref, $-[0], $+[0] - $-[0]);
+               unless ($rdelspec =~ s/\A([[(<{]+)($XMLNAME).*/ quotemeta 
"$1\/$2". _revbracket($1) /oes)
                {
                        _failmsg "Unable to construct closing tag to match: 
$rdel",
                                 pos $$textref;
@@ -748,8 +751,8 @@
                }
                my $extrapos = pos($$textref);
                $$textref =~ m{.*\n}gc;
-               $str1pos = pos($$textref);
-               unless ($$textref =~ m{.*?\n(?=$label\n)}gc) {
+               $str1pos = pos($$textref)--;
+               unless ($$textref =~ m{.*?\n(?=\Q$label\E\n)}gc) {
                        _failmsg qq{Missing here doc terminator ('$label') 
after "} .
                                     substr($$textref, $startpos, 20) .
                                     q{..."},
@@ -758,7 +761,7 @@
                        return;
                }
                $rd1pos = pos($$textref);
-               $$textref =~ m{$label\n}gc;
+        $$textref =~ m{\Q$label\E\n}gc;
                $ld2pos = pos($$textref);
                return (
                        $startpos,      $oppos-$startpos,       # PREFIX
@@ -791,15 +794,17 @@
        if ($ldel1 =~ /[[(<{]/)
        {
                $rdel1 =~ tr/[({</])}>/;
-               _match_bracketed($textref,"",$ldel1,"","",$rdel1)
+               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)
@@ -826,7 +831,7 @@
                if ($ldel2 =~ /[[(<{]/)
                {
                        pos($$textref)--;       # OVERCOME BROKEN LOOKAHEAD 
-                       _match_bracketed($textref,"",$ldel2,"","",$rdel2)
+                       
defined(_match_bracketed($textref,"",$ldel2,"","",$rdel2))
                        || do { pos $$textref = $startpos; return };
                }
                else
@@ -919,18 +924,19 @@
                                $class = $class[$i];
                                $lastpos = pos $$textref;
                                if (ref($func) eq 'CODE')
-                                       { ($field,$rem,$pref) = @bits = 
$func->($$textref);
-                                       # print "[$field|$rem]" if $field;
-                                       }
+                                       { ($field,$rem,$pref) = @bits = 
$func->($$textref) }
                                elsif (ref($func) eq 
'Text::Balanced::Extractor')
                                        { @bits = $field = 
$func->extract($$textref) }
                                elsif( $$textref =~ m/\G$func/gc )
-                                       { @bits = $field = defined($1) ? $1 : 
$& }
+                                       { @bits = $field = defined($1)
+                                ? $1
+                                : substr($$textref, $-[0], $+[0] - $-[0])
+                    }
                                $pref ||= "";
                                if (defined($field) && length($field))
                                {
                                        if (!$igunk) {
-                                               $unkpos = pos $$textref
+                                               $unkpos = $lastpos
                                                        if length($pref) && 
!defined($unkpos);
                                                if (defined $unkpos)
                                                {
@@ -1126,9 +1132,9 @@
 current C<pos> location of the string's variable
 (or at index zero, if no C<pos> position is defined).
 In other words, the C<extract_...> subroutines I<don't>
-extract the first occurance of a substring anywhere
+extract the first occurrence of a substring anywhere
 in a string (like an unanchored regex would). Rather,
-they extract an occurance of the substring appearing
+they extract an occurrence of the substring appearing
 immediately at the current matching position in the
 string (like a C<\G>-anchored regex would).
 
@@ -1144,7 +1150,7 @@
 =item [0]
 
 The extracted string, including the specified delimiters.
-If the extraction fails an empty string is returned.
+If the extraction fails C<undef> is returned.
 
 =item [1]
 
@@ -1154,7 +1160,7 @@
 =item [2]
 
 The skipped prefix (i.e. the characters before the extracted string).
-On failure, the empty string is returned.
+On failure, C<undef> is returned.
 
 =back 
 
@@ -1394,7 +1400,7 @@
 
 C<extract_variable> extracts any valid Perl variable or
 variable-involved expression, including scalars, arrays, hashes, array
-accesses, hash look-ups, method calls through objects, subroutine calles
+accesses, hash look-ups, method calls through objects, subroutine calls
 through subroutine references, etc.
 
 The subroutine takes up to two optional arguments:
@@ -2053,7 +2059,7 @@
 character is extracted from the start of the text and the extraction
 subroutines reapplied. Characters which are thus removed are accumulated and
 eventually become the next field (unless the fourth argument is true, in which
-case they are disgarded).
+case they are discarded).
 
 For example, the following extracts substrings that are valid Perl variables:
 
@@ -2140,9 +2146,10 @@
 is used for the remaining delimiters.
 If no escape char is specified for a given specified delimiter, '\' is used.
 
-Note that 
-C<gen_delimited_pat> was previously called
-C<delimited_pat>. That name may still be used, but is now deprecated.
+=head2 C<delimited_pat>
+
+Note that C<gen_delimited_pat> was previously called C<delimited_pat>.
+That name may still be used, but is now deprecated.
         
 
 =head1 DIAGNOSTICS

==== //depot/maint-5.8/perl/lib/Text/Balanced/Changes#3 (text) ====
Index: perl/lib/Text/Balanced/Changes
--- perl/lib/Text/Balanced/Changes#2~19991~     2003-07-04 06:54:33.000000000 
-0700
+++ perl/lib/Text/Balanced/Changes      2007-02-07 14:21:00.000000000 -0800
@@ -299,3 +299,44 @@
        - Constrainted _match_quote to only match at word boundaries
          (so "exemplum(hic)" doesn't match "m(hic)")
          (thanks Craig)
+
+
+
+1.96.0  Mon May  1 21:52:37 2006
+
+       - Fixed major bug in extract_multiple handling of unknowns
+
+       - Fixed return value on failure (thanks Eric)
+
+    - Fixed bug differentiating heredocs and left-shift operators
+      (thanks Anthony)
+
+1.97   Mon May  1 21:58:04 2006
+
+    - Removed three-part version number and dependency on version.pm
+
+
+1.98  Fri May  5 14:58:49 2006
+
+    - Reinstated full test suite (thanks Steve!)
+
+
+
+1.99.0  Thu Nov 16 07:32:06 2006
+
+    - Removed reliance on expensive $& variable (thanks John)
+
+    - Made Makefile.PL play nice with core versions (thanks Schwern!)
+
+
+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)

==== //depot/maint-5.8/perl/lib/Text/Balanced/README#3 (xtext) ====
Index: perl/lib/Text/Balanced/README
--- perl/lib/Text/Balanced/README#2~19991~      2003-07-04 06:54:33.000000000 
-0700
+++ perl/lib/Text/Balanced/README       2007-02-07 14:21:00.000000000 -0800
@@ -1,14 +1,8 @@
-==============================================================================
-                  Release of version 1.95 of Text::Balanced
-==============================================================================
-
-
-NAME
+Text::Balanced version 2.0.0
 
     Text::Balanced - Extract delimited text sequences from strings.
 
-
-SUMMARY (see Balanced.pod for full details)
+SUMMARY
 
     Text::Balanced::extract_delimited
     
@@ -42,42 +36,36 @@
     
         `extract_tagged' attempts to recognize and extract a
         substring between two arbitrary "tag" patterns (a start tag
-       and an end tag).
-
-    
-INSTALLATION
-
-    It's all pure Perl, so just put the .pm file in its appropriate
-    local Perl subdirectory.
-
+       and an end tag).
 
-AUTHOR
-
-    Damian Conway ([EMAIL PROTECTED])
 
+INSTALLATION
 
-COPYRIGHT
+To install this module, run the following commands:
 
-     Copyright (c) 1997-2001, Damian Conway. All Rights Reserved.
-     This module is free software. It may be used, redistributed
-         and/or modified under the same terms as Perl itself.
+    perl Makefile.PL
+    make
+    make test
+    make install
 
 
+Alternatively, to install with Module::Build, you can use the following 
commands:
 
-==============================================================================
+    perl Build.PL
+    ./Build
+    ./Build test
+    ./Build install
 
-CHANGES IN VERSION 1.95
 
 
-       - Constrainted _match_quote to only match at word boundaries
-         (so "exemplum(hic)" doesn't match "m(hic)")
-         (thanks Craig)
+DEPENDENCIES
 
+None.
 
-==============================================================================
 
-AVAILABILITY
+COPYRIGHT AND LICENCE
 
-Text::Balanced has been uploaded to the CPAN
+Copyright (C) 2006, Damian Conway
 
-==============================================================================
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.

==== //depot/maint-5.8/perl/lib/Text/Balanced/t/00-load.t#1 (xtext) ====
Index: perl/lib/Text/Balanced/t/00-load.t
--- /dev/null   2007-01-16 11:55:45.526841103 -0800
+++ perl/lib/Text/Balanced/t/00-load.t  2007-02-07 14:21:00.000000000 -0800
@@ -0,0 +1,7 @@
+use Test::More tests => 1;
+
+BEGIN {
+use_ok( 'Text::Balanced' );
+diag( "Testing Text::Balanced $Text::Balanced::VERSION" )
+    unless $ENV{PERL_CORE};
+}

==== //depot/maint-5.8/perl/lib/Text/Balanced/t/00.load.t#1 (xtext) ====
Index: perl/lib/Text/Balanced/t/00.load.t
--- /dev/null   2007-01-16 11:55:45.526841103 -0800
+++ perl/lib/Text/Balanced/t/00.load.t  2007-02-07 14:21:00.000000000 -0800
@@ -0,0 +1,7 @@
+use Test::More tests => 1;
+
+BEGIN {
+use_ok( 'Text::Balanced' );
+}
+
+diag( "Testing Text::Balanced $Text::Balanced::VERSION" );

==== //depot/maint-5.8/perl/lib/Text/Balanced/t/extcbk.t#3 (text) ====
Index: perl/lib/Text/Balanced/t/extcbk.t
--- perl/lib/Text/Balanced/t/extcbk.t#2~19991~  2003-07-04 06:54:33.000000000 
-0700
+++ perl/lib/Text/Balanced/t/extcbk.t   2007-02-07 14:21:00.000000000 -0800
@@ -40,7 +40,7 @@
        my @res;
        $var = eval "[EMAIL PROTECTED] = $cmd";
        debug "\t   Failed: $@ at " . [EMAIL PROTECTED] .")" if $@;
-       debug "\t list got: [" . join("|",@res) . "]\n";
+       debug "\t list got: [" . join("|", map {defined $_ ? $_ : '<undef>'} 
@res) . "]\n";
        debug "\t list left: [$str]\n";
        print "not " if (substr($str,pos($str)||0,1) eq ';')==$neg;
        print "ok ", $count++;

==== //depot/maint-5.8/perl/lib/Text/Balanced/t/extmul.t#2 (text) ====
Index: perl/lib/Text/Balanced/t/extmul.t
--- perl/lib/Text/Balanced/t/extmul.t#1~17645~  2002-07-19 12:29:57.000000000 
-0700
+++ perl/lib/Text/Balanced/t/extmul.t   2007-02-07 14:21:00.000000000 -0800
@@ -13,7 +13,7 @@
 # Change 1..1 below to 1..last_test_to_print .
 # (It may become useful if the test is moved to ./t subdirectory.)
 
-BEGIN { $| = 1; print "1..85\n"; }
+BEGIN { $| = 1; print "1..86\n"; }
 END {print "not ok 1\n" unless $loaded;}
 use Text::Balanced qw ( :ALL );
 $loaded = 1;
@@ -316,3 +316,11 @@
 
 expect [ pos ], [ 0 ];
 expect [ $_ ], [ substr($stdtext3,2) ];
+
+
+# TEST 86
+
+# Fails in Text-Balanced-1.95 with result ['1 ', '""', '1234']
+$_ = q{ ""1234};
+expect [ extract_multiple(undef, [\&extract_quotelike]) ],
+       [ ' ', '""', '1234' ];

==== //depot/maint-5.8/perl/lib/Text/Balanced/t/extqlk.t#2 (text) ====
Index: perl/lib/Text/Balanced/t/extqlk.t
--- perl/lib/Text/Balanced/t/extqlk.t#1~17645~  2002-07-19 12:29:57.000000000 
-0700
+++ perl/lib/Text/Balanced/t/extqlk.t   2007-02-07 14:21:00.000000000 -0800
@@ -14,15 +14,16 @@
 # Change 1..1 below to 1..last_test_to_print .
 # (It may become useful if the test is moved to ./t subdirectory.)
 
-BEGIN { $| = 1; print "1..89\n"; }
+BEGIN { $| = 1; print "1..95\n"; }
 END {print "not ok 1\n" unless $loaded;}
 use Text::Balanced qw ( extract_quotelike );
 $loaded = 1;
 print "ok 1\n";
 $count=2;
 use vars qw( $DEBUG );
-# $DEBUG=1;
-sub debug { print "\t>>>",@_ if $DEBUG }
+#$DEBUG=1;
+sub debug { print "\t>>>",@_ if $ENV{DEBUG} }
+sub esc   { my $x = shift||'<undef>'; $x =~ s/\n/\\n/gs; $x }
 
 ######################### End of black magic.
 
@@ -32,36 +33,52 @@
 while (defined($str = <DATA>))
 {
        chomp $str;
-       if ($str =~ s/\A# USING://) { $neg = 0; $cmd = $str; next; }
+       if ($str =~ s/\A# USING://)                 { $neg = 0; $cmd = $str; 
next; }
        elsif ($str =~ /\A# TH[EI]SE? SHOULD FAIL/) { $neg = 1; next; }
-       elsif (!$str || $str =~ /\A#/) { $neg = 0; next }
-       debug "\tUsing: $cmd\n";
-       debug "\t   on: [$str]\n";
+       elsif (!$str || $str =~ /\A#/)              { $neg = 0; next }
+       my $setup_cmd = ($str =~ s/\A\{(.*)\}//) ? $1 : '';
+       my $tests = 'sl';
        $str =~ s/\\n/\n/g;
        my $orig = $str;
 
-        my @res;
-       eval [EMAIL PROTECTED] = $cmd; };
-       debug "\t  got:\n" . join "", map { $res[$_]=~s/\n/\\n/g; "\t\t\t$_: 
[$res[$_]]\n"} (0..$#res);
-       debug "\t left: " . (map { s/\n/\\n/g; "[$_]\n" } my $cpy1 = $str)[0];
-       debug "\t  pos: " . (map { s/\n/\\n/g; "[$_]\n" } my $cpy2 = 
substr($str,pos($str)))[0] . "...]\n";
-       print "not " if (substr($str,pos($str),1) eq ';')==$neg;
-       print "ok ", $count++;
-       print "\n";
-
-       $str = $orig;
-       debug "\tUsing: scalar $cmd\n";
-       debug "\t   on: [$str]\n";
-       $var = eval $cmd;
-       print " ($@)" if $@ && $DEBUG;
-       $var = "<undef>" unless defined $var;
-       debug "\t scalar got: " . (map { s/\n/\\n/g; "[$_]\n" } $var)[0];
-       debug "\t scalar left: " . (map { s/\n/\\n/g; "[$_]\n" } $str)[0];
-       print "not " if ($str =~ '\A;')==$neg;
-       print "ok ", $count++;
-       print "\n";
+       eval $setup_cmd if $setup_cmd ne ''; 
+       if($tests =~ /l/) {
+               debug "\tUsing: $cmd\n";
+               debug "\t   on: [" . esc($setup_cmd) . "][" . esc($str) . "]\n";
+               my @res;
+               eval [EMAIL PROTECTED] = $cmd; };
+               debug "\t  got:\n" . join "", map { "\t\t\t$_: [" . 
esc($res[$_]) . "]\n"} (0..$#res);
+               debug "\t left: [" . esc($str) . "]\n";
+               debug "\t  pos: [" . esc(substr($str,pos($str))) . "...]\n";
+               print "not " if (substr($str,pos($str),1) eq ';')==$neg;
+               print "ok ", $count++;
+               print "\n";
+       }
+
+       eval $setup_cmd if $setup_cmd ne '';
+       if($tests =~ /s/) {
+               $str = $orig;
+               debug "\tUsing: scalar $cmd\n";
+               debug "\t   on: [" . esc($str) . "]\n";
+               $var = eval $cmd;
+               print " ($@)" if $@ && $DEBUG;
+               $var = "<undef>" unless defined $var;
+               debug "\t scalar got: [" . esc($var) . "]\n";
+               debug "\t scalar left: [" . esc($str) . "]\n";
+               print "not " if ($str =~ '\A;')==$neg;
+               print "ok ", $count++;
+               print "\n";
+       }
 }
 
+# fails in Text::Balanced 1.95
+$_ = qq(s{}{});
+my @z = extract_quotelike();
+print "not " if $z[0] eq '';
+print "ok ", $count++;
+print "\n";
+
+ 
 __DATA__
 
 # USING: extract_quotelike($str);
@@ -81,7 +98,10 @@
 <<"   EOHERE"; done() \nline1\nline2\n   EOHERE\nand next
 <<""; done()\nline1\nline2\n\n and next
 <<; done()\nline1\nline2\n\n and next
-
+# fails in Text::Balanced 1.95
+<<EOHERE;\nEOHERE\n; 
+# fails in Text::Balanced 1.95
+<<"*";\n\n*\n; 
 
 "this is a nested $var[$x] {";
 /a/gci;
@@ -111,6 +131,9 @@
 tr/x/y/;
 y/x/y/;
 
+# fails on Text-Balanced-1.95
+{ $tests = 'l'; pos($str)=6 }012345<<E;\n\nE\n
+
 # THESE SHOULD FAIL
 s<$self->{pat}>{$self->{sub}};         # CAN'T HANDLE '>' in '->'
 s-$self->{pap}-$self->{sub}-;          # CAN'T HANDLE '-' in '->'

==== //depot/maint-5.8/perl/lib/Text/Balanced/t/exttag.t#2 (text) ====
Index: perl/lib/Text/Balanced/t/exttag.t
--- perl/lib/Text/Balanced/t/exttag.t#1~17645~  2002-07-19 12:29:57.000000000 
-0700
+++ perl/lib/Text/Balanced/t/exttag.t   2007-02-07 14:21:00.000000000 -0800
@@ -39,7 +39,7 @@
 
        my @res;
        $var = eval "[EMAIL PROTECTED] = $cmd";
-       debug "\t list got: [" . join("|",@res) . "]\n";
+       debug "\t list got: [" . join("|",map {defined $_ ? $_ : '<undef>'} 
@res) . "]\n";
        debug "\t list left: [$str]\n";
        print "not " if (substr($str,pos($str)||0,1) eq ';')==$neg;
        print "ok ", $count++;

==== //depot/maint-5.8/perl/lib/Text/Balanced/t/extvar.t#3 (text) ====
Index: perl/lib/Text/Balanced/t/extvar.t
--- perl/lib/Text/Balanced/t/extvar.t#2~19991~  2003-07-04 06:54:33.000000000 
-0700
+++ perl/lib/Text/Balanced/t/extvar.t   2007-02-07 14:21:00.000000000 -0800
@@ -39,7 +39,7 @@
 
        my @res;
        $var = eval "[EMAIL PROTECTED] = $cmd";
-       debug "\t list got: [" . join("|",@res) . "]\n";
+       debug "\t list got: [" . join("|",map {defined $_ ? $_ : '<undef>'} 
@res) . "]\n";
        debug "\t list left: [$str]\n";
        print "not " if (substr($str,pos($str)||0,1) eq ';')==$neg;
        print "ok ", $count++;

==== //depot/maint-5.8/perl/lib/Text/Balanced/t/gentag.t#3 (text) ====
Index: perl/lib/Text/Balanced/t/gentag.t
--- perl/lib/Text/Balanced/t/gentag.t#2~19991~  2003-07-04 06:54:33.000000000 
-0700
+++ perl/lib/Text/Balanced/t/gentag.t   2007-02-07 14:21:00.000000000 -0800
@@ -45,7 +45,7 @@
 
        my @res;
        $var = eval { @res = f($str) };
-       debug "\t list got: [" . join("|",@res) . "]\n";
+       debug "\t list got: [" . join("|",map {defined $_ ? $_ : '<undef>'} 
@res) . "]\n";
        debug "\t list left: [$str]\n";
        print "not " if (substr($str,pos($str)||0,1) eq ';')==$neg;
        print "ok ", $count++;

==== //depot/maint-5.8/perl/lib/Text/Balanced/t/pod-coverage.t#1 (xtext) ====
Index: perl/lib/Text/Balanced/t/pod-coverage.t
--- /dev/null   2007-01-16 11:55:45.526841103 -0800
+++ perl/lib/Text/Balanced/t/pod-coverage.t     2007-02-07 14:21:00.000000000 
-0800
@@ -0,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" 
if $@;
+all_pod_coverage_ok();

==== //depot/maint-5.8/perl/lib/Text/Balanced/t/pod.t#1 (xtext) ====
Index: perl/lib/Text/Balanced/t/pod.t
--- /dev/null   2007-01-16 11:55:45.526841103 -0800
+++ perl/lib/Text/Balanced/t/pod.t      2007-02-07 14:21:00.000000000 -0800
@@ -0,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod 1.14";
+plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+all_pod_files_ok();
End of Patch.

Reply via email to