diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-10-11 20:22:08 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-10-11 23:07:36 -0700 |
commit | ef90d20ae1b70bb24316828c3249daee27459a7b (patch) | |
tree | a97bf2827b2c998d0b79c2d57603eca599853a08 /t/lib/warnings/9uninit | |
parent | fa4533d036f96ddb26c693c5b0c642b7cbc7d667 (diff) | |
download | perl-ef90d20ae1b70bb24316828c3249daee27459a7b.tar.gz |
Use const repl optimisation with s///e where possible
In those cases where s///e contains a single variable or a sequence
that is folded to a const op, we can do away with substcont.
PMf_EVAL means that there was an /e. But we don’t actually need to
check that; instead we can just examine the op tree, which we have to
do anyway.
The op tree that s//$x/e and s//"constant"/e compile down to have a
null (a do-block) containing a scope op (block with a single state-
ment, as opposed to op_leave which represents multiple statements)
containing a null followed by the constant or variable.
Diffstat (limited to 't/lib/warnings/9uninit')
-rw-r--r-- | t/lib/warnings/9uninit | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit index 717e7f6fb0..43069f56d4 100644 --- a/t/lib/warnings/9uninit +++ b/t/lib/warnings/9uninit @@ -883,7 +883,7 @@ Use of uninitialized value $m1 in regexp compilation at - line 41. Use of uninitialized value $g1 in substitution (s///) at - line 42. Use of uninitialized value $m1 in regexp compilation at - line 43. Use of uninitialized value $g1 in substitution iterator at - line 43. -Use of uninitialized value $m1 in substitution iterator at - line 44. +Use of uninitialized value $m1 in substitution (s///) at - line 44. Use of uninitialized value in substitution iterator at - line 47. ######## use warnings 'uninitialized'; |