diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-09-10 18:39:12 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-09-10 19:38:25 -0700 |
commit | 094a3eec8ad4cfb12d72a98f11e9186594579b57 (patch) | |
tree | 406c76025535d3bc8e1c890b465905f46a37314c /doio.c | |
parent | 63d661c578abce858318b675580f163d201925a0 (diff) | |
download | perl-094a3eec8ad4cfb12d72a98f11e9186594579b57.tar.gz |
Make filetest ops handle get-magic correctly for glob(ref)s
This patch uses the recently-added MAYBE_DEREF_GV macro which puts the
glob deref logic in one spot. It also adds _nomg and _flags varia-
tions of it. _flags understands the SV_GMAGIC flag.
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -1299,12 +1299,7 @@ Perl_my_stat_flags(pTHX_ const U32 flags) const char *s; STRLEN len; PUTBACK; - if (isGV_with_GP(sv)) { - gv = MUTABLE_GV(sv); - goto do_fstat; - } - else if (SvROK(sv) && isGV_with_GP(SvRV(sv))) { - gv = MUTABLE_GV(SvRV(sv)); + if ((gv = MAYBE_DEREF_GV_flags(sv,flags))) { goto do_fstat; } else if (SvROK(sv) && SvTYPE(SvRV(sv)) == SVt_PVIO) { |