This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert "Fix for RT#1804: Anonymous glob breaks when assigned through"
authorFather Chrysostomos <sprout@cpan.org>
Mon, 25 Oct 2010 21:20:57 +0000 (14:20 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 25 Oct 2010 21:20:57 +0000 (14:20 -0700)
This reverts commit 0fe688f528b0e1b5bef6fb30d5e45316430e8a41, except
for the tests.

It is no longer necessary, as of change 2acc3314e31a9. Another reason
for this revert is that doing so fixes bug #77812, or at least it
would if 2acc3314e31a9 had not fixed that, too.

pp_hot.c

index 3414365..fd270e9 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -112,7 +112,6 @@ PP(pp_and)
 PP(pp_sassign)
 {
     dVAR; dSP; dPOPTOPssrl;
-    U32 wasfake = 0;
 
     if (PL_op->op_private & OPpASSIGN_BACKWARDS) {
        SV * const temp = left;
@@ -198,14 +197,7 @@ PP(pp_sassign)
        }
 
     }
-    /* Allow glob assignments like *$x = ..., which, when the glob has a
-       SVf_FAKE flag, cannot be distinguished from $x = ... without looking
-       at the op tree. */
-    if( isGV_with_GP(right) && cBINOP->op_last->op_type == OP_RV2GV
-     && (wasfake = SvFLAGS(right) & SVf_FAKE) )
-       SvFLAGS(right) &= ~SVf_FAKE;
     SvSetMagicSV(right, left);
-    if(wasfake) SvFLAGS(right) |= SVf_FAKE;
     SETs(right);
     RETURN;
 }