From 862504fb08ed24a37a327d325e83ceac76cf05cf Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sun, 8 Apr 2012 14:51:57 -0700 Subject: [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. --- t/lib/strict/vars | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 't/lib/strict') 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 -- cgit v1.2.1