const U8 canrelocate = (U8)flags & INCPUSH_CAN_RELOCATE;
const U8 unshift = (U8)flags & INCPUSH_UNSHIFT;
const U8 push_basedir = (flags & INCPUSH_NOT_BASEDIR) ? 0 : 1;
- SV *subdir = NULL;
AV *inc;
if (!dir || !*dir)
inc = GvAVn(PL_incgv);
- if (using_sub_dirs) {
- subdir = newSV(0);
- }
-
{
SV *libdir;
/* Change 20189146be79a0596543441fa369c6bf7f85103f, to fix RT#6665,
* archname-specific sub-directories.
*/
if (using_sub_dirs) {
+ SV *subdir = newSV(0);
#ifdef PERL_INC_VERSION_LIST
/* Configure terminates PERL_INC_VERSION_LIST with a NULL */
const char * const incverlist[] = { PERL_INC_VERSION_LIST };
char *unix;
STRLEN len;
+
if ((unix = tounixspec_ts(SvPV(libdir,len),NULL)) != NULL) {
len = strlen(unix);
while (unix[len-1] == '/') len--; /* Cosmetic */
subdir = S_incpush_if_exists(aTHX_ av, subdir);
}
+
+ assert (SvREFCNT(subdir) == 1);
+ SvREFCNT_dec(subdir);
}
/* finally add this lib directory at the end of @INC */
SvREFCNT_dec(libdir);
}
}
- if (subdir) {
- assert (SvREFCNT(subdir) == 1);
- SvREFCNT_dec(subdir);
- }
}
STATIC void