Fix misplaced application of #14016.
Abhijit Menon-Sen [Wed, 2 Jan 2002 17:06:27 +0000 (17:06 +0000)]
p4raw-id: //depot/perl@14020

op.c

diff --git a/op.c b/op.c
index 5bd6448..047fe6d 100644 (file)
--- a/op.c
+++ b/op.c
@@ -5929,8 +5929,6 @@ Perl_ck_fun(pTHX_ OP *o)
                }
                break;
            case OA_FILEREF:
-                       if(kid==cLISTOPo->op_last)
-                           cLISTOPo->op_last = newop;
                if (kid->op_type != OP_GV && kid->op_type != OP_RV2GV) {
                    if (kid->op_type == OP_CONST &&
                        (kid->op_private & OPpCONST_BARE))
@@ -5938,6 +5936,8 @@ Perl_ck_fun(pTHX_ OP *o)
                        OP *newop = newGVOP(OP_GV, 0,
                            gv_fetchpv(SvPVx(((SVOP*)kid)->op_sv, n_a), TRUE,
                                        SVt_PVIO) );
+                       if (kid == cLISTOPo->op_last)
+                           cLISTOPo->op_last = newop;
                        op_free(kid);
                        kid = newop;
                    }