diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-10-25 12:28:33 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-10-25 13:02:57 -0700 |
commit | 830748013f81bcc28d145baf4024efd1b6537704 (patch) | |
tree | 5f00e0da567f9e02a342c8ec8b03f19f59094e83 /pp_sys.c | |
parent | 8063d41989a6e13f8b6f0b167ce69eea83090912 (diff) | |
download | perl-830748013f81bcc28d145baf4024efd1b6537704.tar.gz |
Make untie check the FAKE flag on globs
This allows untie($scalar) to untie the scalar if the last assigned or
returned happened to be a typeglob.
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -903,7 +903,7 @@ PP(pp_untie) const char how = (SvTYPE(sv) == SVt_PVHV || SvTYPE(sv) == SVt_PVAV) ? PERL_MAGIC_tied : PERL_MAGIC_tiedscalar; - if (isGV_with_GP(sv) && !(sv = MUTABLE_SV(GvIOp(sv)))) + if (isGV_with_GP(sv) && !SvFAKE(sv) && !(sv = MUTABLE_SV(GvIOp(sv)))) RETPUSHYES; if ((mg = SvTIED_mg(sv, how))) { |