my ($tests, $reports);
BEGIN {
- $tests = 70;
- $reports = 82;
+ $tests = 82;
+ $reports = 94;
}
use Test::More tests => 3 * (4 * $tests + $reports) + 4;
my ($meth, $obj, $file, $line) = @$_;
$meth = quotemeta $meth;
$obj = ($obj =~ /^\s*\{/) ? "a block" : "object \"\Q$obj\E\"";
- $file = '\(eval \d+\)' unless defined $file;
- $line = '\d+' unless defined $line;
+ $file = '\((?:re_)?eval \d+\)' unless defined $file;
+ $line = '\d+' unless defined $line;
qr/^Indirect call of method "$meth" on $obj at $file line $line/
} eval $expected;
}
$obj = "apple @{[new $x qq|@{[stuff $y]}|]} pear"
----
[ 'stuff', '$y' ], [ 'new', '$x' ]
+#### # local $_ = "foo";
+s/foo/return; new Hlagh/e;
+----
+[ 'new', 'Hlagh' ]
+#### # local $_ = "bar";
+s/foo/return; new Hlagh/e;
+----
+[ 'new', 'Hlagh' ]
+#### # local $_ = "foo";
+s/foo/return; new $x/e;
+----
+[ 'new', '$x' ]
+#### # local $_ = "bar";
+s/foo/return; new $x/e;
+----
+[ 'new', '$x' ]
+#### # local $_ = "foo";
+s/foo/return; new $y/e;
+----
+[ 'new', '$y' ]
+#### # local $_ = "bar";
+s/foo/return; new $y/e;
+----
+[ 'new', '$y' ]
+####
+"foo" =~ /(?{new Hlagh})/;
+----
+[ 'new', 'Hlagh' ]
+####
+"foo" =~ /(?{new $x})/;
+----
+[ 'new', '$x' ]
+####
+"foo" =~ /(?{new $y})/;
+----
+[ 'new', '$y' ]
+####
+"foo" =~ /(??{new Hlagh})/;
+----
+[ 'new', 'Hlagh' ]
+####
+"foo" =~ /(??{new $x})/;
+----
+[ 'new', '$x' ]
+####
+"foo" =~ /(??{new $y})/;
+----
+[ 'new', '$y' ]
####
meh { };
----