diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-09-10 06:17:53 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-09-10 06:43:49 -0700 |
commit | 2ea1cce77902231565b9c624151dbab02ef92821 (patch) | |
tree | 0f31423d73a32896382fdf6efdd5ecd2d7046e5e /pp_sys.c | |
parent | 557fbd17eba6e0db6dab333c82d35234963af435 (diff) | |
download | perl-2ea1cce77902231565b9c624151dbab02ef92821.tar.gz |
ch(dir|mod|own) should also call FETCH on refs to tied globs
Following on from commit 935647290357b277, which corrected the beha-
viour for tied globs, this commit corrects the behaviour for refer-
ences to tied globs.
(With tests by Nicholas Clark.)
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -3466,18 +3466,8 @@ PP(pp_chdir) if (PL_op->op_flags & OPf_SPECIAL) { gv = gv_fetchsv(sv, 0, SVt_PVIO); } - else { - SvGETMAGIC(sv); - if(isGV_with_GP(sv)) { - gv = MUTABLE_GV(sv); - } - else if (SvROK(sv) && isGV_with_GP(SvRV(sv))) { - gv = MUTABLE_GV(SvRV(sv)); - } - else { + else if (!(gv = MAYBE_DEREF_GV(sv))) tmps = SvPV_nomg_const_nolen(sv); - } - } } if( !gv && (!tmps || !*tmps) ) { |