Skip Menu |

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

Report information
The Basics
Id: 84377
Status: resolved
Priority: 0/
Queue: Test-Harness

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 3.26
Fixed in: (no value)



Subject: Propagate PERL5LIB into -T tests in prove & TAP::Harness.
Test::Harness and TAP::Parser::Aggregator (and thus prove) are inconsistent in how they treat PERL5LIB when a test is run with -T.

Test::Harness has special code to take PERL5LIB and ensure it's propagated to the tests.  This is in Test::Harness::_apply_extra_INC.  TAP::Harness does not have this.  The upshot is if you have PERL5LIB set a test with -T will have its @INC altered under Test::Harness but not under TAP::Harness (or prove).

This is a problem for the user of local::lib or other home dir Perl installations.  Their PERL5LIB is always set.  Tests with -T which work under "make test" will break under prove because they will not see installed modules.  So it's not an obscure issue.

I ran into this particularly with Mail::Box which has its own harness based on TAP::Harness.

I broke this in 88671fb6bdaf163973c8da575defbfd306e71a1c

I would like to...

* Move the _apply_extra_INC code into TAP::Parser::Aggregator and make it an option.
* Turn it on by default.

On by default because it is necessary to support a very common Perl environment, the home dir Perl library install / local::lib, and to avoid a silent and subtle difference between "make test" and prove.
Fixed and uploaded as 3.27.