summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2011-03-04 16:44:24 -0600
committerCraig A. Berry <craigberry@mac.com>2011-03-04 16:44:24 -0600
commit816005240f1a3b9989c940e630e829048597537c (patch)
tree1986a2aa532036d57500583a84e3ba39f58dd211
parent3185893b8dec1062defd5763c6bb63e945f2a5a4 (diff)
downloadperl-816005240f1a3b9989c940e630e829048597537c.tar.gz
In S_incpush, unixify libdir earlier.
This allows, for example, -I[.lib] to have Unix format appendages added, such as "/buildcustomize.pl", "/sitecustomize.pl", etc. It was previously only being converted to Unix syntax to allow the addition of subdirectories, but the number of things that want to glue pieces onto lib/ have multiplied over the years.
-rw-r--r--perl.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/perl.c b/perl.c
index 491c036260..127c2d4439 100644
--- a/perl.c
+++ b/perl.c
@@ -4429,6 +4429,21 @@ S_incpush(pTHX_ const char *const dir, STRLEN len, U32 flags)
libdir = newSVpv(PERLLIB_MANGLE(dir, 0), 0);
}
+#ifdef VMS
+ char *unix;
+ STRLEN len;
+
+ if ((unix = tounixspec_ts(SvPV(libdir,len),NULL)) != NULL) {
+ len = strlen(unix);
+ while (unix[len-1] == '/') len--; /* Cosmetic */
+ sv_usepvn(libdir,unix,len);
+ }
+ else
+ PerlIO_printf(Perl_error_log,
+ "Failed to unixify @INC element \"%s\"\n",
+ SvPV(libdir,len));
+#endif
+
/* Do the if() outside the #ifdef to avoid warnings about an unused
parameter. */
if (canrelocate) {
@@ -4539,22 +4554,6 @@ S_incpush(pTHX_ const char *const dir, STRLEN len, U32 flags)
const char * const incverlist[] = { PERL_INC_VERSION_LIST };
const char * const *incver;
#endif
-#ifdef VMS
- char *unix;
- STRLEN len;
-
-
- if ((unix = tounixspec_ts(SvPV(libdir,len),NULL)) != NULL) {
- len = strlen(unix);
- while (unix[len-1] == '/') len--; /* Cosmetic */
- sv_usepvn(libdir,unix,len);
- }
- else
- PerlIO_printf(Perl_error_log,
- "Failed to unixify @INC element \"%s\"\n",
- SvPV(libdir,len));
-#endif
-
subdir = newSVsv(libdir);
if (add_versioned_sub_dirs) {