From: Nicholas Clark Date: Wed, 30 Sep 2009 07:50:25 +0000 (+0100) Subject: Simplify building the Perl code invoked for perl -V X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=37ca4a5b0e9f2e075b875f76e6e1d90c52288ad9;p=p5sagit%2Fp5-mst-13.2.git Simplify building the Perl code invoked for perl -V --- diff --git a/perl.c b/perl.c index 5a37bb2..be11625 100644 --- a/perl.c +++ b/perl.c @@ -1844,18 +1844,17 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit) { SV *opts_prog; - Perl_av_create_and_push(aTHX_ &PL_preambleav, newSVpvs("use Config;")); if (*++s != ':') { - opts_prog = newSVpvs("Config::_V()"); + opts_prog = newSVpvs("use Config; Config::_V()"); } else { ++s; opts_prog = Perl_newSVpvf(aTHX_ - "Config::config_vars(qw%c%s%c)", + "use Config; Config::config_vars(qw%c%s%c)", 0, s, 0); s += strlen(s); } - av_push(PL_preambleav, opts_prog); + Perl_av_create_and_push(aTHX_ &PL_preambleav, opts_prog); /* don't look for script or read stdin */ scriptname = BIT_BUCKET; goto reswitch;