Test length() warning with pad vars
authorFather Chrysostomos <sprout@cpan.org>
Thu, 17 Nov 2011 21:03:39 +0000 (13:03 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 19 Nov 2011 01:46:22 +0000 (17:46 -0800)
t/lib/warnings/op

index b66e775..b8bed27 100644 (file)
@@ -930,11 +930,15 @@ length(%a);
 length(@$a);
 length(%$a);
 length($a);
+length(my %h);
+length(my @a);
 EXPECT
 length() used on @array (did you mean "scalar(@array)"?) at - line 3.
 length() used on %hash (did you mean "scalar(keys %hash)"?) at - line 4.
 length() used on @array (did you mean "scalar(@array)"?) at - line 5.
 length() used on %hash (did you mean "scalar(keys %hash)"?) at - line 6.
+length() used on %hash (did you mean "scalar(keys %hash)"?) at - line 8.
+length() used on @array (did you mean "scalar(@array)"?) at - line 9.
 ########
 # op.c
 use warnings 'syntax' ;