diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-11-17 09:35:53 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-11-17 10:22:24 -0800 |
commit | 45aff279082494e5b76a5348427b63c8be1066aa (patch) | |
tree | d1e55414f1bc536edb90ebd22471f1193682d73b /ext/arybase | |
parent | 4e7fd22c88572020fe1efa67cd1781126f901d9e (diff) | |
download | perl-45aff279082494e5b76a5348427b63c8be1066aa.tar.gz |
arybase.xs: Check that $[ is in the main stash
Check that $[ is in the main stash before doing anything magical with
$[=1. This can only be in another stash if some other XS module has
overridden the check functions to change $[ to $foo::[. But robust-
ness is good, right?
Diffstat (limited to 'ext/arybase')
-rw-r--r-- | ext/arybase/arybase.xs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/arybase/arybase.xs b/ext/arybase/arybase.xs index 5c653e3f2d..7cee0dc40e 100644 --- a/ext/arybase/arybase.xs +++ b/ext/arybase/arybase.xs @@ -137,6 +137,7 @@ STATIC bool ab_op_is_dollar_bracket(pTHX_ OP *o) { return o->op_type == OP_RV2SV && (o->op_flags & OPf_KIDS) && (c = cUNOPx(o)->op_first) && c->op_type == OP_GV + && GvSTASH(cGVOPx_gv(c)) == PL_defstash && strEQ(GvNAME(cGVOPx_gv(c)), "["); } |