summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorGisle Aas <gisle@activestate.com>2006-01-06 10:54:18 +0000
committerGisle Aas <gisle@activestate.com>2006-01-06 10:54:18 +0000
commit59e235cb8daec2c43b3d74772367e9ea06c2ce9b (patch)
tree84e79ea3e5851dcab978642fc7627f7dc15dcdcf /perl.c
parent74ac850a5ee417afa60a477ea52af7a8f46a7e5a (diff)
downloadperl-59e235cb8daec2c43b3d74772367e9ea06c2ce9b.tar.gz
Make '-s' on the shebang line able to parse -foo=bar switches again.
This feature was broken by change 19695 some years ago and integrated into perl-5.8.1. perl-5.8.0 was fine. Ref http://bugs.activestate.com/show_bug.cgi?id=43483 p4raw-id: //depot/perl@26670
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl.c b/perl.c
index 720fe15255..f37857824f 100644
--- a/perl.c
+++ b/perl.c
@@ -4519,8 +4519,9 @@ Perl_init_argv_symbols(pTHX_ register int argc, register char **argv)
break;
}
if ((s = strchr(argv[0], '='))) {
- *s++ = '\0';
- sv_setpv(GvSV(gv_fetchpv(argv[0]+1,TRUE, SVt_PV)),s);
+ *s = '\0';
+ sv_setpv(GvSV(gv_fetchpv(argv[0] + 1, TRUE, SVt_PV)), s + 1);
+ *s = '=';
}
else
sv_setiv(GvSV(gv_fetchpv(argv[0]+1,TRUE, SVt_PV)),1);