Detypos (and sticking with US spelling since Dan Sugalski
[p5sagit/p5-mst-13.2.git] / pp_sys.c
index c55f0a4..a7e89a7 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -608,6 +608,7 @@ PP(pp_pipe_op)
 
     IoIFP(rstio) = PerlIO_fdopen(fd[0], "r");
     IoOFP(wstio) = PerlIO_fdopen(fd[1], "w");
+    IoOFP(rstio) = IoIFP(rstio);
     IoIFP(wstio) = IoOFP(wstio);
     IoTYPE(rstio) = IoTYPE_RDONLY;
     IoTYPE(wstio) = IoTYPE_WRONLY;
@@ -824,9 +825,7 @@ PP(pp_tie)
     if (sv_isobject(sv)) {
        sv_unmagic(varsv, how);
        /* Croak if a self-tie on an aggregate is attempted. */
-       if (varsv == SvRV(sv) &&
-           (SvTYPE(sv) == SVt_PVAV ||
-            SvTYPE(sv) == SVt_PVHV))
+       if (varsv == SvRV(sv) && how == PERL_MAGIC_tied)
            Perl_croak(aTHX_
                       "Self-ties of arrays and hashes are not supported");
        sv_magic(varsv, sv, how, Nullch, 0);