return $self->pp_list($op, $cx);
} elsif ($op->first->name eq "enter") {
return $self->pp_leave($op, $cx);
+ } elsif ($op->first->name eq "leave") {
+ return $self->pp_leave($op->first, $cx);
+ } elsif ($op->first->name eq "scope") {
+ return $self->pp_scope($op->first, $cx);
} elsif ($op->targ == OP_STRINGIFY) {
return $self->dquote($op, $cx);
} elsif (!null($op->first->sibling) and
use strict;
use Config;
-print "1..40\n";
+print "1..42\n";
use B::Deparse;
my $deparse = B::Deparse->new() or print "not ";
}
else {
my $deparsed = $deparse->coderef2text( $coderef );
- my $regex = quotemeta($expected);
- do {
- no warnings 'misc';
- $regex =~ s/\s+/\s+/g;
- };
+ my $regex = $expected;
+ $regex =~ s/(\S+)/\Q$1/g;
+ $regex =~ s/\s+/\\s+/g;
+ $regex = '^\{\s*' . $regex . '\s*\}$';
- my $ok = ($deparsed =~ /^\{\s*$regex\s*\}$/);
+ my $ok = ($deparsed =~ /$regex/);
print (($ok ? "ok " : "not ok ") . $i++ . "\n");
if (!$ok) {
print "# EXPECTED:\n";
# 34 (bug #38684)
our @ary;
@ary = split(' ', 'foo', 0);
+####
+# 35 (bug #40055)
+do { () };
+####
+# 36 (ibid.)
+do { my $x = 1; $x };