diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2004-03-14 17:01:34 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2004-03-14 17:01:34 +0000 |
commit | af5acbb47cec8f9dd3c4a2594507c21a7f1ce63b (patch) | |
tree | e4cac932e91c1a4047ab665bccda4e8828f3d825 /t/lib | |
parent | dfd914092bc0efff7a5ad67a7b5cadfabbc009a6 (diff) | |
download | perl-af5acbb47cec8f9dd3c4a2594507c21a7f1ce63b.tar.gz |
[perl #27628] strict 'subs' didn't warn on bareword array index
p4raw-id: //depot/perl@22499
Diffstat (limited to 't/lib')
-rw-r--r-- | t/lib/strict/subs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/lib/strict/subs b/t/lib/strict/subs index 4f0e6215f7..20a8afa80e 100644 --- a/t/lib/strict/subs +++ b/t/lib/strict/subs @@ -380,3 +380,16 @@ qr/(?{my $x=foo})/; EXPECT Bareword "foo" not allowed while "strict subs" in use at (re_eval 1) line 1. Compilation failed in regexp at - line 3. +######## +# [perl #27628] strict 'subs' didn't warn on bareword array index +use strict 'subs'; +my $x=$a[FOO]; +EXPECT +Bareword "FOO" not allowed while "strict subs" in use at - line 3. +Execution of - aborted due to compilation errors. +######## +use strict 'subs'; +my @a;my $x=$a[FOO]; +EXPECT +Bareword "FOO" not allowed while "strict subs" in use at - line 2. +Execution of - aborted due to compilation errors. |