Revert "[perl #77496] tied gets scalars and globs confused"
authorFather Chrysostomos <sprout@cpan.org>
Thu, 2 Dec 2010 17:36:48 +0000 (09:36 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 3 Dec 2010 01:45:06 +0000 (17:45 -0800)
This reverts commit 8752206e276cffe588c0932b5a9f2331640e8447.

pp_sys.c
t/op/tie.t

index 695199a..e068ec6 100644 (file)
--- 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) && !SvFAKE(sv) && !(sv = MUTABLE_SV(GvIOp(sv))))
+    if (isGV_with_GP(sv) && !(sv = MUTABLE_SV(GvIOp(sv))))
        RETPUSHUNDEF;
 
     if ((mg = SvTIED_mg(sv, how))) {
index a9fb89e..6e52a6e 100644 (file)
@@ -939,17 +939,3 @@ sub IO::File::TIEARRAY {
 fileno FOO; tie @a, "FOO"
 EXPECT
 Can't locate object method "TIEARRAY" via package "FOO" at - line 5.
-########
-
-# tied() should still work on tied scalars after glob assignment
-sub TIESCALAR {bless[]}
-sub FETCH {*foo}
-sub f::TIEHANDLE{bless[],f}
-tie *foo, "f";
-tie $rin, "";
-[$rin]; # call FETCH
-print ref tied $rin, "\n";
-print ref tied *$rin, "\n";
-EXPECT
-main
-f