diff options
author | Lukas Mai <unknown> | 2003-10-07 21:47:43 +0000 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2003-10-09 07:43:56 +0000 |
commit | 3d27e215577f06a0418206573270be9a039edb17 (patch) | |
tree | 0461d1e7a8d99c7b72df648c98a2bb7e275aafe4 /perl.c | |
parent | b9f7248f5bf0348b2c36c1de17da1068f6300b55 (diff) | |
download | perl-3d27e215577f06a0418206573270be9a039edb17.tar.gz |
Patch based on:
Subject: [perl #24157] -MModule=} is broken
From: "Lukas Mai" (via RT) <perlbug-followup@perl.org>
Message-Id: <rt-24157-65809.10.9980909617566@rt.perl.org>
(Includes a fix for a similar problem in -A, but not -d.)
p4raw-id: //depot/perl@21429
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -2398,7 +2398,7 @@ Perl_moreswitches(pTHX_ char *s) sv_catpvn(sv, start, s-start); sv_catpv(sv, " split(/,/,q{"); sv_catpv(sv, ++s); - sv_catpv(sv, "})"); + sv_catpv(sv, "})"); } s += strlen(s); my_setenv("PERL5DB", SvPV(sv, PL_na)); @@ -2497,9 +2497,10 @@ Perl_moreswitches(pTHX_ char *s) if (!PL_preambleav) PL_preambleav = newAV(); if (*++s) { - SV *sv = newSVpvn("use assertions::activate split(/,/,q{",37); + SV *sv = newSVpv("use assertions::activate split(/,/,q", 0); + sv_catpvn(sv, "\0", 1); /* Use NUL as q//-delimiter. */ sv_catpv(sv,s); - sv_catpv(sv,"})"); + sv_catpvn(sv, "\0)", 2); s+=strlen(s); av_push(PL_preambleav, sv); } @@ -2533,9 +2534,10 @@ Perl_moreswitches(pTHX_ char *s) Perl_croak(aTHX_ "Module name required with -%c option", s[-1]); sv_catpvn(sv, start, s-start); - sv_catpv(sv, " split(/,/,q{"); + sv_catpv(sv, " split(/,/,q"); + sv_catpvn(sv, "\0)", 1); /* Use NUL as q//-delimiter. */ sv_catpv(sv, ++s); - sv_catpv(sv, "})"); + sv_catpvn(sv, "\0)", 2); } s += strlen(s); if (!PL_preambleav) |