develooper Front page | perl.perl5.porters | Postings from August 2009

5.10.1-RC1 Test::Harness ruins @INC

From:
Sisyphus
Date:
August 9, 2009 11:56
Subject:
5.10.1-RC1 Test::Harness ruins @INC
Message ID:
996335FFA8E14804BBD21C0FE4586462@desktop2
Hi,

I'm on Win32 (Windows XP). Below my sig is the output of 'perl -V' for this 
(5.10.1-RC1) build of perl.

Let's start with a simple test script (inc.pl):

#############################
use warnings;

print "1..1\n";

print STDERR "\nINC: $_" for @INC;
print STDERR "\n\n";

print "ok 1\n";
#############################

No problems with that - it outputs:

#############################
C:\>perl inc.pl
1..1

INC: C:/perl510_M/5.10.1/lib
INC: C:/perl510_M/site/5.10.1/lib
INC: C:/perl510_M/site/lib
INC: .

ok 1

C:\>
#############################

This is as expected - the @INC is identical to that reported by 'perl -V'.

However, if I run that test script via Test::Harness::runtests() the output 
changes quite markedly:

#############################
C:\>perl -MTest::Harness -e "runtests('inc.pl')"
inc.pl ..
INC: C:/PERL51~1/510~1.1/lib
INC: .

inc.pl .. ok
All tests successful.
Files=1, Tests=1,  0 wallclock secs ( 0.08 usr +  0.00 sys =  0.08 CPU)
Result: PASS

C:\>
#############################

Most notably, 2 of the @INC directories (C:/perl510_M/site/5.10.1/lib and 
C:/perl510_M/site/lib) have been lost.
Therefore, any test script that needs to load a module that has been 
installed into one of those missing @INC locations crashes during 'make 
test'.
(Also, I notice we get the short pathname for C:/perl510_M/5.10.1/lib, but 
that in itself is not a problem.)

I haven't yet tracked down the cause of the problem (which seems to arise 
*only* when I build a "versioned" perl).
Can someone here suggest a likely place to find the cause ?

Cheers,
Rob

Summary of my perl5 (revision 5 version 10 subversion 1) configuration:

  Platform:
    osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags 
' -s -O2 -DWIN32 -DHAVE_DES_FCRYPT  -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS 
 -fno-strict-aliasing -DPERL_MSVCRT_READFIX',
    optimize='-s -O2',
    cppflags='-DWIN32'
    ccversion='', gccversion='3.4.5', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long long', 
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='g++', ldflags 
='-s -L"c:\perl510_M\5.10.1\lib\CORE" -L"C:\home\rob\mingw_vista\i686-pc-mingw32\lib"'
    libpth=C:\home\rob\mingw_vista\i686-pc-mingw32\lib
    libs= -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 
 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm 
 -lversion -lodbc32 -lodbccp32
    perllibs= -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 
 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm 
 -lversion -lodbc32 -lodbccp32
    libc=-lmsvcrt, so=dll, useshrplib=true, libperl=libperl510.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', 
lddlflags='-mdll -s -L"c:\perl510_M\5.10.1\lib\CORE" -L"C:\home\rob\mingw_vista\i686-pc-mingw32\lib"'


Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
                        PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
                        PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS
                        USE_LARGE_FILES USE_PERLIO
  Locally applied patches:
 RC1
  Built under MSWin32
  Compiled at Aug  9 2009 20:04:14
  @INC:
    C:/perl510_M/5.10.1/lib
    C:/perl510_M/site/5.10.1/lib
    C:/perl510_M/site/lib
    .





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About