This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #118857] Test punct vars’ exemption from ‘once’ warnings
authorFather Chrysostomos <sprout@cpan.org>
Sat, 13 Jul 2013 06:18:08 +0000 (23:18 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 13 Jul 2013 06:18:08 +0000 (23:18 -0700)
t/lib/warnings/perl

index a00ed62..3a0af11 100644 (file)
@@ -39,6 +39,16 @@ $z = 3
 EXPECT
 Name "main::x" used only once: possible typo at - line 3.
 ########
+# perl.c
+use warnings 'once';
+$\; # test a few
+$:; # punct vars
+$0; # and
+$123; # numbers
+$_;    # and
+$_foo;  # underscores (none of which should warn)
+EXPECT
+########
 -W
 # perl.c
 no warnings 'once' ;