diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2001-11-07 23:23:39 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-08 14:14:40 +0000 |
commit | a11ec5a9742ba7c7b0571f3f33d5d0663ab1f98e (patch) | |
tree | 80618e71b018cc62e892c2dc2cc0a52ee2341202 /toke.c | |
parent | 35c336e69f1f9c585a41a86f5e2726ef276d4152 (diff) | |
download | perl-a11ec5a9742ba7c7b0571f3f33d5d0663ab1f98e.tar.gz |
-s on #! line
Message-ID: <20011107222339.E729@rafael>
p4raw-id: //depot/perl@12900
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -2688,6 +2688,7 @@ Perl_yylex(pTHX) while (SPACE_OR_TAB(*d)) d++; if (*d++ == '-') { + bool switches_done = PL_doswitches; do { if (*d == 'M' || *d == 'm') { char *m = d; @@ -2711,6 +2712,14 @@ Perl_yylex(pTHX) (void)gv_fetchfile(PL_origfilename); goto retry; } + if (PL_doswitches && !switches_done) { + int argc = PL_origargc; + char **argv = PL_origargv; + do { + argc--,argv++; + } while (argc && argv[0][0] == '-' && argv[0][1]); + init_argv_symbols(argc,argv); + } } } } |