summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-03-05 19:59:42 +0000
committerNicholas Clark <nick@ccl4.org>2011-03-05 20:18:17 +0000
commit76895e89c1e609b1a740ae887e6bcf7ece9d4222 (patch)
tree12320cc76b5ff9abfa412cdcb0a9939723093036 /perl.c
parent30688243d28f88dab0c8fe6c6e420dcf5b37a316 (diff)
downloadperl-76895e89c1e609b1a740ae887e6bcf7ece9d4222.tar.gz
59d6f6a4c05afa7f was too aggressive, as it disabled #! line -I on miniperl
Restore -I processing on the #! line for miniperl. This gets t/run/switchI.t and t/run/switchd-78586.t passing again under minitest.
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/perl.c b/perl.c
index dd557af42a..5efa8e5433 100644
--- a/perl.c
+++ b/perl.c
@@ -4592,11 +4592,15 @@ S_incpush(pTHX_ const char *const dir, STRLEN len, U32 flags)
#endif /* !PERL_IS_MINIPERL */
/* finally add this lib directory at the end of @INC */
if (unshift) {
-#ifndef PERL_IS_MINIPERL
+#ifdef PERL_IS_MINIPERL
+ const U32 extra = 0;
+#else
U32 extra = av_len(av) + 1;
+#endif
av_unshift(inc, extra + push_basedir);
if (push_basedir)
av_store(inc, extra, libdir);
+#ifndef PERL_IS_MINIPERL
while (extra--) {
/* av owns a reference, av_store() expects to be donated a
reference, and av expects to be sane when it's cleared.