Skip Menu |

This queue is for tickets about the Test-Harness CPAN distribution.

Report information
The Basics
Id: 5246
Status: rejected
Priority: 0/
Queue: Test-Harness

People
Owner: andy [...] hexten.net
Requestors: geoffr [...] gbdirect.co.uk
JFITZ [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)

Attachments


Subject: Directory names containing ':' break it
Hi, (I'm looking at Test::Harness version 2.40). I have Perl modules stored in directories named after the modules, with colons in the directory names. This breaks running "make test" because the directory names go in $ENV{PERL5LIB}, and Perl splits that on colon. This is only a problem with more recent versions of ExtUtils::MakeMaker, since it started turning relative paths into absolute ones. In older versions it would try to use things like 'blib/lib', which is fine. Could this not be changed to pass include directories in via -I instead? That would make it more robust.
Subject: Working Path containing :: breaks @INC in Test::Harness
On *nix (specifically any system that uses a colon as it's $PATH separator), working paths that have double colons (in my case named for the module) break @INC when testing via Test::Harness. Working in a directory '/usr/home/james/test-harness-colonpath-bug/Bro::ken', this error output is seen: # Error: Can't locate Foo.pm in @INC (@INC contains: /usr/home/james/test-harness-colonpath-bug/Bro ken/blib/lib /usr/home/james/test-harness-colonpath-bug/Bro ken/blib/arch /usr/home/james/myperl/lib/perl5 /usr/home/james/myperl/lib/p See how @INC is being broken in the middle of a directory name, which causes the module to not be found. I realize that this may not be a bug per-se in Test::Harness, as it is just setting $ENV{PERL5LIB}, and Perl is then interpreting it incorrectly: Test::Harness::Straps::_INC2PERL5LIB(/usr/local/lib/perl5/5.8.6/Test/Harness/Straps.pm:423): 423: return join $Config{path_sep}, $self->_filtered_INC; DB<2> p $Config{path_sep} : DB<3> p join $Config{path_sep}, $self->_filtered_INC /usr/home/james/test-harness-colonpath-bug/Bro::ken/blib/lib:/usr/home/james/test-harness-colonpath-bug/Bro::ken/blib/arch:/usr/home/james/myperl/lib/perl5:/usr/home/james/myperl/lib/perl5/site_perl:/usr/local/lib/perl5/5.8.6/i386-freebsd:/usr/local/lib/perl5/5.8.6:/usr/local/lib/perl5/site_perl/5.8.6/i386-freebsd:/usr/local/lib/perl5/site_perl/5.8.6:/usr/local/lib/perl5/site_perl/5.8.5/i386-freebsd:/usr/local/lib/perl5/site_perl/5.8.5:/usr/local/lib/perl5/site_perl:. However, Test::Harness could change from using $ENV{PERL5LIB} to manipulating @INC directly, which should address this. At the very least, checking if any individual element of @INC contains $Config{path_sep} before turning @INC into $ENV{PERL5LIB} and issuing a warning if an element does would go a long way towards easing diagnosis of the problem. The attached tarball contains a simple example of the problem. It contains two folders named Bro::ken and Work-ing. Running perl Makefile.PL make test in each will expose the bug.

Message body not shown because it is not plain text.

[JFITZ - Sun Jun 12 13:17:28 2005]: I had originally filed this bug with the author of Module::Build, who showed me that the problem was in Test::Harness. I re-filed before noticing that my report is a dupe of RT #5246 (which was filed a year ago). Whoops.
Unfortunately we need to be able to use PERL5LIB in certain situations so it's impossible to reliably fix this.