summaryrefslogtreecommitdiff
path: root/t/lib/strict
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-04-08 14:51:57 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-04-19 20:09:11 -0700
commit862504fb08ed24a37a327d325e83ceac76cf05cf (patch)
tree238d2b61272bc768ded95a08609f5ee9755cdc78 /t/lib/strict
parented5958d4d0be98bffc846ce92d77c382457feea0 (diff)
downloadperl-862504fb08ed24a37a327d325e83ceac76cf05cf.tar.gz
[perl #112316] Make strict vars respect assignment to null pkg
Under threads, strict vars was not respecting assignment to a package with a null in its name if the name of the package assigned from was equal to the prefix of the destination package up to the null.
Diffstat (limited to 't/lib/strict')
-rw-r--r--t/lib/strict/vars9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/lib/strict/vars b/t/lib/strict/vars
index fdd7af3416..28aab48e5c 100644
--- a/t/lib/strict/vars
+++ b/t/lib/strict/vars
@@ -536,3 +536,12 @@ use strict 'vars';
no warnings;
eval q/$dweck/;
EXPECT
+########
+# [perl #112316] strict vars getting confused by nulls
+# Assigning to a package whose name contains a null
+BEGIN { *Foo:: = *{"foo\0bar::"} }
+package foo;
+*Foo::bar = [];
+use strict;
+eval 'package Foo; @bar = 1' or die;
+EXPECT