Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: doughera [...] lafayette.edu
scratchcomputing [...] gmail.com
Cc:
AdminCc:

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



CC: Perl Porters <perl5-porters [...] perl.org>
Subject: utils/prove loses @INC settings
Date: Wed, 25 Jun 2008 17:07:23 -0400 (EDT)
To: bug-test-harness [...] rt.cpan.org
From: Andy Dougherty <doughera [...] lafayette.edu>
When building perl, the following used to work: echo 'use Test;' > try.t ./perl -Ilib utils/prove try.t It now (bleadperl@34087) fails with try......Can't locate Test.pm in @INC where @INC contains the locations where perl will be installed. But if perl has not yet been installed, then Test.pm can't be found. In perl-5.8.8, it was sufficient to pass -Ilib to ./perl. In 5.10.x, it is apparently necessary to do ./perl -Ilib utils/prove -Ilib try.t That's right: -Ilib must be specified twice. Without the first one, perl complains 'Can't locate strict.pm'. I don't know how, why, or when utils/prove loses track of the ./lib directory. -- Andy Dougherty doughera@lafayette.edu
CC: bug-test-harness [...] rt.cpan.org
Subject: Re: utils/prove loses @INC settings
Date: Wed, 25 Jun 2008 14:42:38 -0700
To: perl5-porters [...] perl.org
From: Eric Wilhelm <scratchcomputing [...] gmail.com>
# from Andy Dougherty # on Wednesday 25 June 2008 14:07: Show quoted text
>In 5.10.x, it is apparently necessary to do >    >    ./perl -Ilib utils/prove -Ilib try.t > >That's right:  -Ilib must be specified twice.  Without the first one, >perl complains 'Can't locate strict.pm'.  I don't know how, why, or > when utils/prove loses track of the ./lib directory.
It does not "lose track of" the @INC from the parent process. TAP::Harness *does* introduce a separation between "options passed to the perl which runs prove" and "options passed to the perl which runs tests" -- this distinction is by design. Assuming that the core's "util/prove" is a "stock" copy from TAP::Harness, it should stay this way. If more convenience is desired for testing ("with" and "of") a non-installed perl, a thin wrapper (or PERL5LIB, etc) should be used to set the @INC on both sides of prove. --Eric -- "You can't win. You can't break even. You can't quit." --Ginsberg's Restatement of the Three Laws of Thermodynamics --------------------------------------------------- http://scratchcomputing.com ---------------------------------------------------