diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-08-31 13:11:03 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-08-31 14:12:35 -0700 |
commit | 9054c817efbd6919e7870e558c4f83bba9607ed5 (patch) | |
tree | 14788b99be6d2c80c927ffc1c94cb4b46d6ed425 /perl.c | |
parent | 6fd9f6130d0c4ad34a2ddcf44d887097de5b2847 (diff) | |
download | perl-9054c817efbd6919e7870e558c4f83bba9607ed5.tar.gz |
Get ‘./miniperl -Ilib -T’ working
If the first directory included via -I contains buildcustomize.pl,
then miniperl will try to load it at startup. This allows the build
process to access all the necessary directories, because
buildcustomize.pl fills in @INC.
This was not working under taint mode, making it a pain for me to
diagnose tainting bugs with miniperl (which builds faster than perl
proper, obviously).
It failed because buildcustomize.pl is loaded with generated code that
does ‘do "lib/buildcustomize.pl"’ (where ‘lib’ is taken from -Ilib),
but do-file searches @INC, which does not include the current direc-
tory under taint mode.
The easiest solution here is to add ‘./’ to the beginning of the path.
It is unlikely that anyone is using miniperl -I/... (with an absolute
path), and miniperl is only supposed to be used for building or devel-
oping perl, anyway.
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2070,7 +2070,9 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit) it should be reported immediately as a build failure. */ (void)Perl_av_create_and_unshift_one(aTHX_ &PL_preambleav, Perl_newSVpvf(aTHX_ - "BEGIN { do {local $!; -f q%c%"SVf"/buildcustomize.pl%c} and do q%c%"SVf"/buildcustomize.pl%c || die $@ }", + "BEGIN { do {local $!; -f q%c./%"SVf + "/buildcustomize.pl%c} and do q%c./%"SVf + "/buildcustomize.pl%c || die $@ }", 0, SVfARG(*inc0), 0, 0, SVfARG(*inc0), 0)); } |