From: Nicholas Clark Date: Mon, 13 Apr 2009 10:47:15 +0000 (+0100) Subject: our $TODO should be local $::TODO, revealing a bug in the de-commenting regexp. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4a4b8592c1ff4f27425d55dad0bff22cd56bbf4f;p=p5sagit%2Fp5-mst-13.2.git our $TODO should be local $::TODO, revealing a bug in the de-commenting regexp. Remove some orphaned trailing quotes from TODO message that are no longer conditional code. --- diff --git a/ext/B/t/deparse.t b/ext/B/t/deparse.t index 2404202..6ba97d0 100644 --- a/ext/B/t/deparse.t +++ b/ext/B/t/deparse.t @@ -65,7 +65,7 @@ while () { } } - s/#\s*(.*)$//mg; + s/^\s*#\s*(.*)$//mg; my ($num, $testname) = $1 =~ m/(\d+)\s*(.*)/; if ($reason{skip}) { @@ -95,7 +95,7 @@ while () { $regex =~ s/\s+/\\s+/g; $regex = '^\{\s*' . $regex . '\s*\}$'; - our $TODO = $reason{todo}; + local $::TODO = $reason{todo}; like($deparsed, qr/$regex/, $testname); } } @@ -432,15 +432,15 @@ else { x(); } my($y, $t); /x${y}z$t/; #### -# TODO new undocumented cpan-bug #33708" +# TODO new undocumented cpan-bug #33708 # 55 (cpan-bug #33708) %{$_ || {}} #### -# TODO hash constants not yet fixed" +# TODO hash constants not yet fixed # 56 (cpan-bug #33708) use constant H => { "#" => 1 }; H->{"#"} #### -# TODO optimized away 0 not yet fixed" +# TODO optimized away 0 not yet fixed # 57 (cpan-bug #33708) foreach my $i (@_) { 0 } #### diff --git a/t/lib/common.pl b/t/lib/common.pl index b300400..ef95c9d 100644 --- a/t/lib/common.pl +++ b/t/lib/common.pl @@ -185,8 +185,8 @@ for (@prgs){ $ok = $results eq $expected; } - our $TODO = $reason{todo}; - print_err_line( $switch, $prog, $expected, $results, $TODO ) unless $ok; + local $::TODO = $reason{todo}; + print_err_line( $switch, $prog, $expected, $results, $::TODO ) unless $ok; ok($ok);