Actually submit previous change.
[p5sagit/p5-mst-13.2.git] / t / lib / strict / subs
index 4f0e621..20a8afa 100644 (file)
@@ -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.