diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2007-09-09 22:27:38 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2007-09-09 22:27:38 +0000 |
commit | cc4b8646f4297d1d601d9f445953d91eaef16779 (patch) | |
tree | 3dc9e9a13342381303aecae02d42213b29db2473 /t | |
parent | a74073ad6436c46fca5196ffa4ea01684b55afc4 (diff) | |
download | perl-cc4b8646f4297d1d601d9f445953d91eaef16779.tar.gz |
ununit pos value warning identified the wrong variable name
p4raw-id: //depot/perl@31834
Diffstat (limited to 't')
-rw-r--r-- | t/lib/warnings/9uninit | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit index f49ca66474..9fb5df1359 100644 --- a/t/lib/warnings/9uninit +++ b/t/lib/warnings/9uninit @@ -759,6 +759,22 @@ Use of uninitialized value $m1 in scalar assignment at - line 5. ######## use warnings 'uninitialized'; my ($m1); +our ($g1); + +$v = pos($m1) + 1; +$v = pos($g1) + 1; +$m1 = 0; +$g1 = ""; +$v = pos($m1) + 1; +$v = pos($g1) + 1; +EXPECT +Use of uninitialized value in addition (+) at - line 5. +Use of uninitialized value in addition (+) at - line 6. +Use of uninitialized value in addition (+) at - line 9. +Use of uninitialized value in addition (+) at - line 10. +######## +use warnings 'uninitialized'; +my ($m1); { my $x = "a" x $m1 } # NB LHS of repeat does not warn { my @x = ("a") x $m1 } |