summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorYitzchak Scott-Thoennes <sthoenna@efn.org>2003-06-03 17:08:32 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2003-06-05 18:50:51 +0000
commitf0b2cf552638278613953870ec9b5623f83b321d (patch)
tree6c6026cb33c07d128046a103bf3fceb19cbc108e /toke.c
parent84c133a0c99ec2d2efc517f14b45051d3bfe4074 (diff)
downloadperl-f0b2cf552638278613953870ec9b5623f83b321d.tar.gz
Re: SPUG:-s option doesn't always work!
Message-ID: <wrZ3+gzkg2iX092yn@efn.org> p4raw-id: //depot/perl@19695
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/toke.c b/toke.c
index 4d694cdfcb..d57dc0cef9 100644
--- a/toke.c
+++ b/toke.c
@@ -2727,6 +2727,14 @@ Perl_yylex(pTHX)
}
d = moreswitches(d);
} while (d);
+ 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);
+ }
if ((PERLDB_LINE && !oldpdb) ||
((PL_minus_n || PL_minus_p) && !(oldn || oldp)))
/* if we have already added "LINE: while (<>) {",