diff options
author | Randy J. Ray <rjray@redhat.com> | 2000-08-07 12:12:25 -0700 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-08-08 17:33:34 +0000 |
commit | 70c94a1962e4ec78d69c2158c32b643ceb04ff36 (patch) | |
tree | d3737e5c0f29632ad591dd904f9ef607a7858111 /perl.c | |
parent | 9baa0206214393e14c90c1119dbe3c122969f510 (diff) | |
download | perl-70c94a1962e4ec78d69c2158c32b643ceb04ff36.tar.gz |
Patch against 5.6.0 to allow "-d:Module=arg,arg,arg"
Message-Id: <200008080212.TAA12784@tzimisce.soma.redhat.com>
p4raw-id: //depot/perl@6547
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -2060,9 +2060,25 @@ Perl_moreswitches(pTHX_ char *s) case 'd': forbid_setid("-d"); s++; - if (*s == ':' || *s == '=') { - my_setenv("PERL5DB", Perl_form(aTHX_ "use Devel::%s;", ++s)); + /* The following permits -d:Mod to accepts arguments following an = + in the fashion that -MSome::Mod does. */ + if (*s == ':' || *s == '=') { + char *start; + SV *sv; + sv = newSVpv("use Devel::", 0); + start = ++s; + /* We now allow -d:Module=Foo,Bar */ + while(isALNUM(*s) || *s==':') ++s; + if (*s != '=') + sv_catpv(sv, start); + else { + sv_catpvn(sv, start, s-start); + sv_catpv(sv, " split(/,/,q{"); + sv_catpv(sv, ++s); + sv_catpv(sv, "})"); + } s += strlen(s); + my_setenv("PERL5DB", SvPV(sv, PL_na)); } if (!PL_perldb) { PL_perldb = PERLDB_ALL; |