This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate #18405 from maint-5.8 which fixes whitespac
authorNick Ing-Simmons <nik@tiuk.ti.com>
Mon, 20 Jan 2003 08:34:10 +0000 (08:34 +0000)
committerNick Ing-Simmons <nik@tiuk.ti.com>
Mon, 20 Jan 2003 08:34:10 +0000 (08:34 +0000)
issues in open(FH,"&...")

p4raw-id: //depot/perl@18517
p4raw-integrated: from //depot/maint-5.8/perl@18516 'merge in' doio.c
(@18405..)

doio.c

diff --git a/doio.c b/doio.c
index 3ae3764..fe8ed7e 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -323,13 +323,13 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
                    if (num_svs > 1) {
                        Perl_croak(aTHX_ "More than one argument to '%c&' open",IoTYPE(io));
                    }
+                   /*SUPPRESS 530*/
+                   for (; isSPACE(*type); type++) ;
                    if (num_svs && (SvIOK(*svp) || (SvPOK(*svp) && looks_like_number(*svp)))) {
                        fd = SvUV(*svp);
                        num_svs = 0;
                    }
                    else if (isDIGIT(*type)) {
-                       /*SUPPRESS 530*/
-                       for (; isSPACE(*type); type++) ;
                        fd = atoi(type);
                    }
                    else {
@@ -339,8 +339,6 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
                        }
                        else {
                            GV *thatgv;
-                           /*SUPPRESS 530*/
-                           for (; isSPACE(*type); type++) ;
                            thatgv = gv_fetchpv(type,FALSE,SVt_PVIO);
                            thatio = GvIO(thatgv);
                        }