Revert "[perl #77688] tie $scalar can tie a handle"
authorFather Chrysostomos <sprout@cpan.org>
Thu, 2 Dec 2010 17:36:41 +0000 (09:36 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 3 Dec 2010 01:45:06 +0000 (17:45 -0800)
This reverts commit 9aa8b00892d81bb5e94565d3cb9841dd57b7b9cf.

pp_sys.c
t/op/tie.t

index a69cbcf..695199a 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -826,7 +826,7 @@ PP(pp_tie)
            break;
        case SVt_PVGV:
        case SVt_PVLV:
-           if (isGV_with_GP(varsv) && !SvFAKE(varsv)) {
+           if (isGV_with_GP(varsv)) {
                methname = "TIEHANDLE";
                how = PERL_MAGIC_tiedscalar;
                /* For tied filehandles, we apply tiedscalar magic to the IO
index 5acd9a9..a9fb89e 100644 (file)
@@ -953,14 +953,3 @@ print ref tied *$rin, "\n";
 EXPECT
 main
 f
-########
-
-# tie $glob_copy vs tie *$glob_copy
-sub TIESCALAR { print "TIESCALAR\n" }
-sub TIEHANDLE{ print "TIEHANDLE\n" }
-$f = *foo;
-tie *$f, "";
-tie $f, "";
-EXPECT
-TIEHANDLE
-TIESCALAR