This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Tweak Deparse-core.t after the last two commits
authorFather Chrysostomos <sprout@cpan.org>
Sun, 7 Dec 2014 14:52:23 +0000 (06:52 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 7 Dec 2014 14:54:07 +0000 (06:54 -0800)
lib/B/Deparse-core.t

index 7c1bd2a..cfab4bc 100644 (file)
@@ -75,6 +75,12 @@ sub testit {
                #  the rest don't parenthesize the my var.
                $repl = 'my($a)';
            }
+           elsif ($expr =~ 'CORE::do') {
+               # do foo() is a syntax error, so B::Deparse emits
+               # do (foo()), but does not distinguish between foo and my,
+               # because it is too complicated.
+               $repl = '(my $a)';
+           }
            s/\$a/$repl/ for $expr, $expected_expr;
        }