summaryrefslogtreecommitdiff
path: root/t/re/reg_eval_scope.t
diff options
context:
space:
mode:
Diffstat (limited to 't/re/reg_eval_scope.t')
-rw-r--r--t/re/reg_eval_scope.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/re/reg_eval_scope.t b/t/re/reg_eval_scope.t
index 860b4c80f7..a23321f2d2 100644
--- a/t/re/reg_eval_scope.t
+++ b/t/re/reg_eval_scope.t
@@ -16,7 +16,6 @@ plan 17;
sub on { $::TODO = "(?{}) implementation is screwy" }
sub off { undef $::TODO }
-on;
fresh_perl_is <<'CODE', '781745', {}, '(?{}) has its own lexical scope';
my $x = 7; my $a = 4; my $b = 5;
@@ -24,6 +23,8 @@ fresh_perl_is <<'CODE', '781745', {}, '(?{}) has its own lexical scope';
print $x,$a,$b;
CODE
+on;
+
fresh_perl_is <<'CODE',
for my $x("a".."c") {
$y = 1;
@@ -43,6 +44,8 @@ CODE
{},
'multiple (?{})s in loop with lexicals';
+off;
+
fresh_perl_is <<'CODE', '781745', {}, 'run-time re-eval has its own scope';
use re qw(eval);
my $x = 7; my $a = 4; my $b = 5;
@@ -85,6 +88,8 @@ fresh_perl_is <<'CODE', '178279371047857967101745', {},
CODE
'multiple (?{})s in "foo" =~ /$string/x';
+on;
+
fresh_perl_is <<'CODE', '123123', {},
for my $x(1..3) {
push @regexps = qr/(?{ print $x })a/;