From: Lukas Mai Date: Tue, 7 Oct 2003 21:47:43 +0000 (+0000) Subject: Patch based on: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3d27e215577f06a0418206573270be9a039edb17;p=p5sagit%2Fp5-mst-13.2.git Patch based on: Subject: [perl #24157] -MModule=} is broken From: "Lukas Mai" (via RT) Message-Id: (Includes a fix for a similar problem in -A, but not -d.) p4raw-id: //depot/perl@21429 --- diff --git a/perl.c b/perl.c index acce020..aaa2ca8 100644 --- a/perl.c +++ b/perl.c @@ -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)