diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-01-20 23:40:23 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-01-20 23:40:23 +0000 |
commit | d9f30342f9de4793189d81b85a5e32057393e428 (patch) | |
tree | e0204e2a19983ec6fe2e13a6518faf3b19dbc4a2 /t | |
parent | a36504e104c75cce0ab1c54edce368a9f9f9b78f (diff) | |
download | perl-d9f30342f9de4793189d81b85a5e32057393e428.tar.gz |
defined @$foo and defined %$bar should be subject to strict 'refs';
p4raw-id: //depot/perl@29900
Diffstat (limited to 't')
-rw-r--r-- | t/lib/strict/refs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/lib/strict/refs b/t/lib/strict/refs index dee95e8c8f..6237d6d3a9 100644 --- a/t/lib/strict/refs +++ b/t/lib/strict/refs @@ -308,3 +308,17 @@ my $x = "foo"; defined $$x; EXPECT Can't use string ("foo") as a SCALAR ref while "strict refs" in use at - line 4. +######## +# [perl #37886] strict 'refs' doesn't apply inside defined +use strict 'refs'; +my $x = "foo"; +defined @$x; +EXPECT +Can't use string ("foo") as an ARRAY ref while "strict refs" in use at - line 4. +######## +# [perl #37886] strict 'refs' doesn't apply inside defined +use strict 'refs'; +my $x = "foo"; +defined %$x; +EXPECT +Can't use string ("foo") as a HASH ref while "strict refs" in use at - line 4. |