summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-09-30 08:50:25 +0100
committerNicholas Clark <nick@ccl4.org>2009-09-30 08:51:33 +0100
commit37ca4a5b0e9f2e075b875f76e6e1d90c52288ad9 (patch)
tree37214a48c5058fd130e83ee11fb0477b6d828be9 /perl.c
parentd3c89c47761c74a328499a816b05990e18ed357e (diff)
downloadperl-37ca4a5b0e9f2e075b875f76e6e1d90c52288ad9.tar.gz
Simplify building the Perl code invoked for perl -V
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/perl.c b/perl.c
index 5a37bb234d..be11625eb8 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;