This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Warn by default for constant my sub redefinition
[perl5.git]
/
t
/
lib
/
warnings
/
perl
diff --git
a/t/lib/warnings/perl
b/t/lib/warnings/perl
index
f619cc6
..
a00ed62
100644
(file)
--- a/
t/lib/warnings/perl
+++ b/
t/lib/warnings/perl
@@
-223,3
+223,9
@@
BEGIN { $^W = 1 }
$ŷ = 3 ;
EXPECT
Name "ɕლȃṢȿ::ŷ" used only once: possible typo at - line 9.
+########
+
+use warnings 'once';
+$foo++; BEGIN { eval q|@a =~ s///; sub foo;| }
+EXPECT
+Name "main::foo" used only once: possible typo at - line 3.