diff options
author | Nicholas Clark <nick@ccl4.org> | 2012-01-04 11:23:17 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2012-01-16 16:26:28 +0100 |
commit | b880f709320776e295c5359276e8eb7a40ce30c0 (patch) | |
tree | f9fa26eba4d789627209dd6693098d0dd1330940 | |
parent | c8ca97b0f5c0db7ad9b35fc9c4bea37281bc79ff (diff) | |
download | perl-b880f709320776e295c5359276e8eb7a40ce30c0.tar.gz |
Test that defined warns for package arrays and hashes.
Currently TODO'd for package arrays. The existing tests were only for
lexicals.
-rw-r--r-- | t/lib/warnings/op | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/lib/warnings/op b/t/lib/warnings/op index c05aa9b584..b44910316f 100644 --- a/t/lib/warnings/op +++ b/t/lib/warnings/op @@ -799,6 +799,13 @@ my $a EXPECT ######## # op.c +# TODO - defined @::array doesn't warn yet. +defined(@a); +EXPECT +defined(@array) is deprecated at - line 2. + (Maybe you should just omit the defined()?) +######## +# op.c my @a; defined(@a); EXPECT defined(@array) is deprecated at - line 2. @@ -811,6 +818,12 @@ defined(@array) is deprecated at - line 2. (Maybe you should just omit the defined()?) ######## # op.c +defined(%h); +EXPECT +defined(%hash) is deprecated at - line 2. + (Maybe you should just omit the defined()?) +######## +# op.c my %h; defined(%h); EXPECT defined(%hash) is deprecated at - line 2. |