X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=doio.c;h=3bad8f343ba5e7787d10e6dedbf8c782e9fff9c6;hb=f8f79f57f467ffff4d31dc518ce3f6d2364090a0;hp=0c105191be6ce2930267f1c4b3a455d9ca0b269f;hpb=c2be40b189b2d5e759e6de4217ec02ed2234bc6c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/doio.c b/doio.c index 0c10519..3bad8f3 100644 --- a/doio.c +++ b/doio.c @@ -422,6 +422,8 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw, fp = PerlIO_openn(aTHX_ type,mode,-1,0,0,NULL,num_svs,svp); } } /* !& */ + if (!fp && type && *type && *type != ':' && !isIDFIRST(*type)) + goto unknown_open_mode; } /* IoTYPE_WRONLY */ else if (*type == IoTYPE_RDONLY) { /*SUPPRESS 530*/ @@ -453,6 +455,8 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw, } fp = PerlIO_openn(aTHX_ type,mode,-1,0,0,NULL,num_svs,svp); } + if (!fp && type && *type && *type != ':' && !isIDFIRST(*type)) + goto unknown_open_mode; } /* IoTYPE_RDONLY */ else if ((num_svs && /* '-|...' or '...|' */ type[0] == IoTYPE_STD && type[1] == IoTYPE_PIPE) ||