Front page | perl.perl5.porters |
Postings from May 2003
[perl #22209] Test::Harness::Straps vs. $Config{path_sep}
Thread Next
From:
Mike Stok
Date:
May 15, 2003 08:42
Subject:
[perl #22209] Test::Harness::Straps vs. $Config{path_sep}
Message ID:
rt-22209-57636.17.8387841580384@bugs6.perl.org
# New Ticket Created by Mike Stok
# Please include the string: [perl #22209]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=22209 >
This is a bug report for perl from mike@stok.co.uk,
generated with the help of perlbug 1.34 running under perl v5.8.0.
-----------------------------------------------------------------
[Please enter your report here]
It seems that the use of Test::Harness in post 5.6.1 perls means that
I can't successfully
perl Makefile.PL
make
make test
a module when the path to my module's build directory contains $Config{path_sep}
To reproduce the effect
mkdir -p ~/tmp/A:B
cd ~/tmp/A:B
h2xs -AXn C::D
cd C/D
perl Makefile.PL
make
make test
and you should see an error message like
# Error: Can't locate C/D.pm in @INC (@INC contains: /home/mike/tmp/A B/C/D/blib/lib /home/mike/tmp/A B/C/D/blib/arch /usr/local/mike/lib/perl5/5.8.0/i686-linux /usr/local/mike/lib/perl5/5.8.0/i686-linux /usr/local/mike/lib/perl5/5.8.0 /usr/local/mike/lib/perl5/site_perl/5.8.0/i686-linux /usr/local/mike/lib/perl5/site_perl/5.8.0/i686-linux /usr/local/mike/lib/perl5/site_perl/5.8.0 /usr/local/mike/lib/perl5/site_perl/5.8.0/i686-linux /usr/local/mike/lib/perl5/site_perl/5.8.0 /usr/local/mike/lib/perl5/site_perl . /usr/local/mike/lib/perl5/5.8.0/i686-linux /usr/local/mike/lib/perl5/5.8.0 /usr/local/mike/lib/perl5/site_perl/5.8.0/i686-linux /usr/local/mike/lib/perl5/site_perl/5.8.0 /usr/local/mike/lib/perl5/site_perl .) at (eval 1) line 2.
This used to work in perl 5.6.x and before because the make test stage used
multiple -I flags to set up @INC.
Test::Harness::Straps uses
local $ENV{PERL5LIB} = $self->_INC2PERL5LIB;
to set up te environment for the test scripts. Once something containing
$Config{path_sep} has been wedged into a string using $Config{path_sep} as
a separator it will become multiple elements of @INC in the test scripts,
and will not do what is expected.
Should there at least be a warning issued by Test::Harness::Straps if
we're about to do encounter this behaviour? Something like
--- Straps.pm.dist 2003-05-12 09:22:18.000000000 -0400
+++ Straps.pm 2003-05-15 09:58:16.000000000 -0400
@@ -356,7 +356,11 @@
$self->{_old5lib} = $ENV{PERL5LIB};
- return join $Config{path_sep}, $self->_filtered_INC;
+ my @new = $self->_filtered_INC;
+ die "$0: Directory shouldn't contain '$Config{path_sep}' (@new)\n"
+ if grep /\Q$Config{path_sep}/, @new;
+
+ return join $Config{path_sep}, @new;
}
=item B<_filtered_INC>
maybe?
I know that it's not a good idea to have directories with : in their name
if they're going to end up in a : separated string, but this is something
which used to work until recently...
This came up when I was reviving some old modules from a CVS archive
where they lived in .../projects/ElephantTalk::Archive style directories
Regards,
Mike
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=library
severity=low
---
Site configuration information for perl v5.8.0:
Configured by mike at Mon May 12 09:08:57 EDT 2003.
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
Platform:
osname=linux, osvers=2.4.21-0.13mdkenterprise, archname=i686-linux
uname='linux ratdog.stok.co.uk 2.4.21-0.13mdkenterprise #1 smp fri mar 14 14:40:17 est 2003 i686 unknown unknown gnulinux '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O3 -march=athlon-xp -pipe',
cppflags='-fno-strict-aliasing'
ccversion='', gccversion='3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags ='-L/usr/local/mike/lib -L/usr/local/lib'
libpth=/usr/local/mike/lib /usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -ldl -lm -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
libc=/lib/libc-2.3.1.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.3.1'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/mike/lib -L/usr/local/lib'
Locally applied patches:
---
@INC for perl v5.8.0:
/usr/local/mike/lib/perl5/5.8.0/i686-linux
/usr/local/mike/lib/perl5/5.8.0
/usr/local/mike/lib/perl5/site_perl/5.8.0/i686-linux
/usr/local/mike/lib/perl5/site_perl/5.8.0
/usr/local/mike/lib/perl5/site_perl
.
---
Environment for perl v5.8.0:
HOME=/home/mike
LANG=en_CA
LANGUAGE=en_CA:en_US:en
LC_ADDRESS=en_CA
LC_COLLATE=en_CA
LC_CTYPE=en_CA
LC_IDENTIFICATION=en_CA
LC_MEASUREMENT=en_CA
LC_MESSAGES=en_CA
LC_MONETARY=en_CA
LC_NAME=en_CA
LC_NUMERIC=en_CA
LC_PAPER=en_CA
LC_TELEPHONE=en_CA
LC_TIME=en_CA
LD_LIBRARY_PATH=/usr/local/mike/lib
LOGDIR (unset)
PATH=/usr/local/mike/bin:/usr/local/mike/Acrobat5/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games:/home/mike/bin
PERL_BADLANG (unset)
SHELL=/bin/bash
Thread Next
-
[perl #22209] Test::Harness::Straps vs. $Config{path_sep}
by Mike Stok