This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update CPAN-Meta to CPAN version 2.112600
[perl5.git] / doio.c
diff --git a/doio.c b/doio.c
index 1edf8d2..022b499 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -1342,19 +1342,16 @@ Perl_my_lstat_flags(pTHX_ const U32 flags)
        }
        return (PL_laststatval = -1);
     }
-    else if (PL_laststype != OP_LSTAT
-           && (PL_op->op_private & OPpFT_STACKED) && ckWARN(WARN_IO))
+    else if (PL_op->op_private & OPpFT_STACKED) {
+      if (PL_laststype != OP_LSTAT)
        Perl_croak(aTHX_ no_prev_lstat);
+      return PL_laststatval;
+    } 
 
     PL_laststype = OP_LSTAT;
     PL_statgv = NULL;
     sv = POPs;
     PUTBACK;
-    if (SvROK(sv) && isGV_with_GP(SvRV(sv)) && ckWARN(WARN_IO)) {
-       Perl_warner(aTHX_ packWARN(WARN_IO), "Use of -l on filehandle %s",
-               GvENAME((const GV *)SvRV(sv)));
-       return (PL_laststatval = -1);
-    }
     file = SvPV_flags_const_nolen(sv, flags);
     sv_setpv(PL_statname,file);
     PL_laststatval = PerlLIO_lstat(file,&PL_statcache);
@@ -2278,7 +2275,7 @@ Perl_do_shmio(pTHX_ I32 optype, SV **mark, SV **sp)
        /* suppress warning when reading into undef var (tchrist 3/Mar/00) */
        if (! SvOK(mstr))
            sv_setpvs(mstr, "");
-       sv_upgrade(mstr, SVt_PV);
+       SvUPGRADE(mstr, SVt_PV);
        SvPOK_only(mstr);
        mbuf = SvGROW(mstr, (STRLEN)msize+1);
 
@@ -2375,6 +2372,7 @@ Perl_vms_start_glob
 #endif
 #endif /* !CSH */
 #endif /* !DOSISH */
+    save_hash(gv_fetchpvs("ENV", 0, SVt_PVHV));
     (void)do_open(PL_last_in_gv, (char*)SvPVX_const(tmpcmd), SvCUR(tmpcmd),
                  FALSE, O_RDONLY, 0, NULL);
     fp = IoIFP(io);