In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/816005240f1a3b9989c940e630e829048597537c?hp=4d56cd4f546df82c1cabd288669bd8227d6847b4>

- Log -----------------------------------------------------------------
commit 816005240f1a3b9989c940e630e829048597537c
Author: Craig A. Berry <[email protected]>
Date:   Fri Mar 4 16:44:24 2011 -0600

    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.

M       perl.c

commit 3185893b8dec1062defd5763c6bb63e945f2a5a4
Author: Craig A. Berry <[email protected]>
Date:   Fri Mar 4 16:35:16 2011 -0600

    In S_incpush, omit subdirs when PERL_IS_MINIPERL.
    
    The new logic in S_parse_body that loads lib/buildcustomize.pl in
    miniperl relies on lib being in $INC[0], which it won't be if we've
    loaded version- and architecture-specific directories before lib.
    
    Since miniperl isn't installed and can't do dynamic loading, it
    doesn't really need those subdirectories, so skip loading them
    for miniperl.

M       perl.c
-----------------------------------------------------------------------

Summary of changes:
 perl.c |   35 +++++++++++++++++++----------------
 1 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/perl.c b/perl.c
index 6bb9f46..127c2d4 100644
--- a/perl.c
+++ b/perl.c
@@ -4384,8 +4384,12 @@ S_incpush(pTHX_ const char *const dir, STRLEN len, U32 
flags)
 {
     dVAR;
     const U8 using_sub_dirs
+#ifdef PERL_IS_MINIPERL
+        = 0;
+#else
        = (U8)flags & (INCPUSH_ADD_VERSIONED_SUB_DIRS
                       |INCPUSH_ADD_ARCHONLY_SUB_DIRS|INCPUSH_ADD_OLD_VERS);
+#endif
     const U8 add_versioned_sub_dirs
        = (U8)flags & INCPUSH_ADD_VERSIONED_SUB_DIRS;
     const U8 add_archonly_sub_dirs
@@ -4425,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) {
@@ -4535,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) {

--
Perl5 Master Repository

Reply via email to