diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-20 15:24:19 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-20 15:24:19 +0000 |
commit | c13f253ac9074f84de2b3cc44ede54179a3ffbf0 (patch) | |
tree | dac4b755b42b4678e2c1b493b060c1e777497a2d /t/lib | |
parent | a6c48a57b9ba63a7a72da88b9735f59a6e97a38e (diff) | |
download | perl-c13f253ac9074f84de2b3cc44ede54179a3ffbf0.tar.gz |
Integrate change #14778 from maintperl;
constant folding on the range operator had the effect of disabling
peephole optimizations in all the siblings of the range OP; the
effect of this was that barewords could escape strictures when
they were hiding in such places
p4raw-link: @14778 on //depot/maint-5.6/perl: 0ef6625236721d79a74c662bb0d14b11d0d775c2
p4raw-id: //depot/perl@14791
p4raw-integrated: from //depot/maint-5.6/perl@14790 'merge in' op.c
(@14439..)
Diffstat (limited to 't/lib')
-rw-r--r-- | t/lib/strict/subs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/lib/strict/subs b/t/lib/strict/subs index 1e8b0588d8..88d4afc258 100644 --- a/t/lib/strict/subs +++ b/t/lib/strict/subs @@ -26,6 +26,15 @@ EXPECT # strict subs - error use strict 'subs' ; +my @a = (1..2); +my $b = xyz; +EXPECT +Bareword "xyz" not allowed while "strict subs" in use at - line 5. +Execution of - aborted due to compilation errors. +######## + +# strict subs - error +use strict 'subs' ; Fred ; EXPECT Bareword "Fred" not allowed while "strict subs" in use at - line 4. |