summaryrefslogtreecommitdiff
path: root/util.c
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 /util.c
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 'util.c')
-rw-r--r--util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util.c b/util.c
index d147e9e8aa..cba3c7bbaf 100644
--- a/util.c
+++ b/util.c
@@ -5872,7 +5872,8 @@ Perl_stashpv_hvname_match(pTHX_ const COP *c, const HV *hv)
}
else
return (stashpv == name
- || strEQ(stashpv, name));
+ || ((STRLEN)HEK_LEN(HvNAME_HEK(hv)) == strlen(stashpv)
+ && strEQ(stashpv, name)));
/*NOTREACHED*/
return FALSE;
}