Change 28404 broke the construct s/foo/<<BAR/e. So, try to be more
[p5sagit/p5-mst-13.2.git] / t / op / regexp.t
index b4288b2..662be92 100755 (executable)
@@ -74,7 +74,21 @@ while (<TESTS>) {
     $result =~ s/B//i unless $skip;
     for $study ('', 'study \$subject') {
        $c = $iters;
-       eval "$study; \$match = (\$subject =~ $OP$pat) while \$c--; \$got = \"$repl\";";
+    if ($qr_embed) {
+           eval qq"
+            my \$RE = qr$pat;
+            $study;
+            \$match = (\$subject =~ /(?:)\$RE(?:)/) while \$c--;
+            \$got = \"$repl\";
+        ";
+    } 
+    else {
+           eval qq"
+            $study;
+            \$match = (\$subject =~ $OP$pat) while \$c--;
+            \$got = \"$repl\";
+        ";
+    }
        chomp( $err = $@ );
        if ($result eq 'c') {
            if ($err !~ m!^\Q$expect!) { print "not ok $. (compile) $input => `$err'\n"; next TEST }