summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-10-24 18:14:47 -0700
committerFather Chrysostomos <sprout@cpan.org>2010-10-24 18:30:13 -0700
commit8752206e276cffe588c0932b5a9f2331640e8447 (patch)
tree94e3836449668d2f23dde015d2bc662a39f9108d /pp_sys.c
parent19b96a2b521beb3b36fd375c46258d57d7d8a31e (diff)
downloadperl-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 78b635f05d..f47395bf53 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -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))) {