summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-01-04 11:23:17 +0100
committerNicholas Clark <nick@ccl4.org>2012-01-16 16:26:28 +0100
commitb880f709320776e295c5359276e8eb7a40ce30c0 (patch)
treef9fa26eba4d789627209dd6693098d0dd1330940
parentc8ca97b0f5c0db7ad9b35fc9c4bea37281bc79ff (diff)
downloadperl-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/op13
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.