summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-11-21 22:40:41 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-11-22 00:07:20 -0800
commit8f84cc86e11f13b85c64fd0205261e12bef9e7f9 (patch)
treedf3a91b7db27eea282c9d79bfdcb781dff894c67 /t
parenta64133684ecb3c95280331d68367527f9c07eaea (diff)
downloadperl-8f84cc86e11f13b85c64fd0205261e12bef9e7f9.tar.gz
Test for lack of uninit warnings in sub redef
This adds tests for something I fixed ‘by mistake’ in efcf35c4, which occurs from 5.8.0 to 5.15.5: $ perl5.15.4 -le ' use warnings "uninitialized"; use constant {u=>undef,v=>undef}; sub foo(){u} sub foo(){v} ' Use of uninitialized value at -e line 1. Use of uninitialized value at -e line 1.
Diffstat (limited to 't')
-rw-r--r--t/lib/warnings/9uninit6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit
index 7d73f019c5..9f42689808 100644
--- a/t/lib/warnings/9uninit
+++ b/t/lib/warnings/9uninit
@@ -2018,3 +2018,9 @@ my $moo = $Foo::BAR + 42;
__END__
EXPECT
Use of uninitialized value in addition (+) at - line 3.
+########
+use warnings 'uninitialized';
+use constant {u=>undef, v=>undef};
+sub foo () {u}
+sub foo () {v}
+EXPECT