else if (curop->op_type == OP_PADSV ||
curop->op_type == OP_PADAV ||
curop->op_type == OP_PADHV ||
- curop->op_type == OP_PADANY) {
+ curop->op_type == OP_PADANY ||
+ curop->op_type == OP_SCOPE /* ${10} */
+ ) {
repl_has_vars = 1;
}
else if (curop->op_type == OP_PUSHRE)
}
}
if (curop == repl
- && !(repl_has_vars
- && (!PM_GETRE(pm)
- || PM_GETRE(pm)->extflags & RXf_EVAL_SEEN))) {
+ && !repl_has_vars
+ && (PM_GETRE(pm) && !PM_GETRE(pm)->extflags & RXf_EVAL_SEEN))
+ {
pm->op_pmflags |= PMf_CONST; /* const for long enough */
pm->op_pmpermflags |= PMf_CONST; /* const for long enough */
prepend_elem(o->op_type, scalar(repl), o);
}
require './test.pl';
-plan( tests => 135 );
+plan( tests => 136 );
$x = 'foo';
$_ = "x";
($c = "\x20\x00\x30\x01\x40\x1A\x50\x1F\x60") =~ s/[\x00-\x1f]//g;
is($c, "\x20\x30\x40\x50\x60", "s/[\\x00-\\x1f]//g");
}
-TODO:{
- local $TODO = "RT#6006 needs resolution";
- $TODO=$TODO;
+{
$_ = "xy";
no warnings 'uninitialized';
/(((((((((x)))))))))(z)/; # clear $10
s/(((((((((x)))))))))(y)/${10}/;
is($_,"y","RT#6006: \$_ eq '$_'");
+ $_ = "xr";
+ s/(((((((((x)))))))))(r)/fooba${10}/;
+ is($_,"foobar","RT#6006: \$_ eq '$_'");
}
{
my $want=("\n" x 11).("B\n" x 11)."B";