Test that defined warns for package arrays and hashes.
authorNicholas Clark <nick@ccl4.org>
Wed, 4 Jan 2012 10:23:17 +0000 (11:23 +0100)
committerNicholas Clark <nick@ccl4.org>
Mon, 16 Jan 2012 15:26:28 +0000 (16:26 +0100)
Currently TODO'd for package arrays. The existing tests were only for
lexicals.

t/lib/warnings/op

index c05aa9b..b449103 100644 (file)
@@ -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.