summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-12-08 10:20:06 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-12-08 10:20:06 +0000
commit7cf31bebccd8b4045fd1d586b26bef41a901c2d0 (patch)
tree01311d1300389cbe150490d4b1a500bafcf061dd /doio.c
parent915df47c6a00eb5a6b8d6051eb019773fc41d707 (diff)
downloadperl-7cf31bebccd8b4045fd1d586b26bef41a901c2d0.tar.gz
Allow multi-arg open() if opening layer declares this legal.
p4raw-id: //depot/perlio@13530
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/doio.c b/doio.c
index abf9ae5a17..ed57c42ccc 100644
--- a/doio.c
+++ b/doio.c
@@ -359,9 +359,6 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
}
} /* & */
else {
- if (num_svs > 1) {
- Perl_croak(aTHX_ "More than one argument to '>' open");
- }
/*SUPPRESS 530*/
for (; isSPACE(*type); type++) ;
if (*type == IoTYPE_STD && (!type[1] || isSPACE(type[1]) || type[1] == ':')) {
@@ -369,6 +366,9 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
type++;
fp = PerlIO_stdout();
IoTYPE(io) = IoTYPE_STD;
+ if (num_svs > 1) {
+ Perl_croak(aTHX_ "More than one argument to '>%c' open",IoTYPE_STD);
+ }
}
else {
if (!num_svs) {
@@ -382,9 +382,6 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
} /* !& */
}
else if (*type == IoTYPE_RDONLY) {
- if (num_svs > 1) {
- Perl_croak(aTHX_ "More than one argument to '<' open");
- }
/*SUPPRESS 530*/
for (type++; isSPACE(*type); type++) ;
mode[0] = 'r';
@@ -401,6 +398,9 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
type++;
fp = PerlIO_stdin();
IoTYPE(io) = IoTYPE_STD;
+ if (num_svs > 1) {
+ Perl_croak(aTHX_ "More than one argument to '<%c' open",IoTYPE_STD);
+ }
}
else {
if (!num_svs) {