This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add test for Change 22194:
authorDave Mitchell <davem@fdisolutions.com>
Sun, 1 Feb 2004 15:34:59 +0000 (15:34 +0000)
committerDave Mitchell <davem@fdisolutions.com>
Sun, 1 Feb 2004 15:34:59 +0000 (15:34 +0000)
[perl #25147] "stmt if BAREWORD" bypasses strict 'subs' checks

p4raw-id: //depot/perl@22256

t/lib/strict/subs

index 9e32909..6cf988c 100644 (file)
@@ -366,3 +366,10 @@ eval q{ use strict; no strict refs; };
 print $@;
 EXPECT
 Bareword "refs" not allowed while "strict subs" in use at (eval 1) line 1.
+########
+# [perl #25147] 
+use strict;
+print "" if BAREWORD;
+EXPECT
+Bareword "BAREWORD" not allowed while "strict subs" in use at - line 3.
+Execution of - aborted due to compilation errors.