Fix #6006 for taint mode too.
Rafael Garcia-Suarez [Sat, 23 Dec 2006 16:15:50 +0000 (16:15 +0000)]
p4raw-id: //depot/perl@29619

op.c
t/op/subst.t

diff --git a/op.c b/op.c
index 626f3e8..8aca413 100644 (file)
--- a/op.c
+++ b/op.c
@@ -3314,6 +3314,7 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg)
            OP *lastop = NULL;
            for (curop = LINKLIST(repl); curop!=repl; curop = LINKLIST(curop)) {
                if (curop->op_type == OP_SCOPE
+                       || curop->op_type == OP_LEAVE
                        || (PL_opargs[curop->op_type] & OA_DANGEROUS)) {
                    if (curop->op_type == OP_GV) {
                        GV * const gv = cGVOPx_gv(curop);
index 39f160d..6cf84b7 100755 (executable)
@@ -563,14 +563,11 @@ is($name, "cis", q[#22351 bug with 'e' substitution modifier]);
     is($c, "\x20\x30\x40\x50\x60", "s/[\\x00-\\x1f]//g");
 }
 {
-    {
-    local our $TODO = ${^TAINT} ? "doesn't work with taint mode" : 0;
     $_ = "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 '$_'");