diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-10-24 18:14:47 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-10-24 18:30:13 -0700 |
commit | 8752206e276cffe588c0932b5a9f2331640e8447 (patch) | |
tree | 94e3836449668d2f23dde015d2bc662a39f9108d /pp_sys.c | |
parent | 19b96a2b521beb3b36fd375c46258d57d7d8a31e (diff) | |
download | perl-8752206e276cffe588c0932b5a9f2331640e8447.tar.gz |
[perl #77496] tied gets scalars and globs confused
Make pp_tied use the SvFAKE flag to distinguish between tied scalars
and tied handles. This is now possible as of change 2acc3314.
This fixes the problem of tied($scalar) ignoring the tie if the last
thing returned or assigned happened to be a glob.
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -941,7 +941,7 @@ PP(pp_tied) 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)))) RETPUSHUNDEF; if ((mg = SvTIED_mg(sv, how))) { |