PerlIO layer table as PL_perlio (per-interpreter)
[p5sagit/p5-mst-13.2.git] / sv.c
diff --git a/sv.c b/sv.c
index 8ddbfa9..3ab9f05 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -9765,9 +9765,12 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
        PL_origargv[i]  = SAVEPV(proto_perl->Iorigargv[i]);
     }
 
-
     param->stashes      = newAV();  /* Setup array of objects to call clone on */
 
+#ifdef PERLIO_LAYERS
+    /* Clone PerlIO table as soon as we can handle general xx_dup() */
+    PerlIO_clone(aTHX_ proto_perl->Iperlio, param);
+#endif
 
     PL_envgv           = gv_dup(proto_perl->Ienvgv, param);
     PL_incgv           = gv_dup(proto_perl->Iincgv, param);