diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-03-19 23:11:12 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-03-19 23:11:12 +0000 |
commit | 0282be9287c81efde41d8df3c62f1c95bb459498 (patch) | |
tree | 2035bee321e1f2d0d35ddcdf2b71da025e4796ab /t | |
parent | 696814337d4eac8d0663d5307d6e01964d1b2897 (diff) | |
download | perl-0282be9287c81efde41d8df3c62f1c95bb459498.tar.gz |
Let %^H be modifiable in eval-strings (bug #41531),
by adding a meaning for OPf_SPECIAL on OP_CONST.
Patch by Yves Orton.
p4raw-id: //depot/perl@30644
Diffstat (limited to 't')
-rw-r--r-- | t/comp/hints.t | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/t/comp/hints.t b/t/comp/hints.t index 32267dee90..55aeb7169e 100644 --- a/t/comp/hints.t +++ b/t/comp/hints.t @@ -8,7 +8,7 @@ BEGIN { } -BEGIN { print "1..15\n"; } +BEGIN { print "1..17\n"; } BEGIN { print "not " if exists $^H{foo}; print "ok 1 - \$^H{foo} doesn't exist initially\n"; @@ -93,3 +93,16 @@ print "not " if length $result; print "ok 15 - double-freeing hints hash\n"; print "# got: $result\n" if length $result; +{ + BEGIN{$^H{x}=1}; + for(1..2) { + eval q( + print $^H{x}==1 && !$^H{y} ? "ok\n" : "not ok\n"; + $^H{y} = 1; + ); + if ($@) { + (my $str = $@)=~s/^/# /gm; + print "not ok\n$str\n"; + } + } +} |