In @INC, move ARCHLIB and PRIVLIB after the current version's site_perl and
Nicholas Clark [Sun, 15 Feb 2009 16:51:10 +0000 (16:51 +0000)]
vendor_perl.

perl.c

diff --git a/perl.c b/perl.c
index 1b38f79..a308cf3 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -4140,10 +4140,6 @@ S_init_perllib(pTHX_ U32 old_vers)
     }
 #endif
 
-#ifdef ARCHLIB_EXP
-    if (!old_vers)
-       incpush_use_sep(ARCHLIB_EXP, INCPUSH_CAN_RELOCATE);
-#endif
     if (!old_vers) {
 #ifdef MACOS_TRADITIONAL
        Stat_t tmpstatbuf;
@@ -4152,6 +4148,11 @@ S_init_perllib(pTHX_ U32 old_vers)
        
        if (!macperl)
            macperl = "";
+
+#  ifdef ARCHLIB_EXP
+    if (!old_vers)
+       incpush_use_sep(ARCHLIB_EXP, INCPUSH_CAN_RELOCATE);
+#  endif
        
        Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl);
        if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode))
@@ -4164,15 +4165,6 @@ S_init_perllib(pTHX_ U32 old_vers)
        if (!PL_tainting)
            S_incpush(aTHX_ STR_WITH_LEN(":"), 0);
 #else
-#ifndef PRIVLIB_EXP
-#  define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl"
-#endif
-
-#if defined(WIN32)
-       incpush_use_sep(PRIVLIB_EXP, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE);
-#else
-       incpush_use_sep(PRIVLIB_EXP, INCPUSH_CAN_RELOCATE);
-#endif
 
 #ifdef SITEARCH_EXP
     /* sitearch is always relative to sitelib on Windows for
@@ -4222,6 +4214,21 @@ S_init_perllib(pTHX_ U32 old_vers)
     incpush_use_sep(PERL_VENDORLIB_STEM, old_vers|INCPUSH_CAN_RELOCATE);
 #endif
 
+    if (!old_vers)
+#ifdef ARCHLIB_EXP
+       incpush_use_sep(ARCHLIB_EXP, INCPUSH_CAN_RELOCATE);
+#endif
+
+#ifndef PRIVLIB_EXP
+#  define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl"
+#endif
+
+#if defined(WIN32)
+       incpush_use_sep(PRIVLIB_EXP, INCPUSH_ADD_SUB_DIRS|INCPUSH_CAN_RELOCATE);
+#else
+       incpush_use_sep(PRIVLIB_EXP, INCPUSH_CAN_RELOCATE);
+#endif
+
 #ifdef PERL_OTHERLIBDIRS
     if (!old_vers) {
        incpush_use_sep(PERL_OTHERLIBDIRS, INCPUSH_ADD_SUB_DIRS