CC: | Perl Porters <perl5-porters [...] perl.org>, bug-test-harness [...] rt.cpan.org |
Subject: | Re: utils/prove loses @INC settings |
Date: | Thu, 26 Jun 2008 09:16:40 -0400 (EDT) |
To: | Eric Wilhelm <scratchcomputing [...] gmail.com> |
From: | Andy Dougherty <doughera [...] lafayette.edu> |
On Wed, 25 Jun 2008, Eric Wilhelm wrote:
Show quoted text
> # from Andy Dougherty
> # on Wednesday 25 June 2008 14:07:
>
Fair enough. It is an incompatible change from the 5.8.8 behavior,
though, so how about a documentation patch something like this? It would
have been enough to let me know what was going on and that it was
deliberate.
diff -r -u perl-current/lib/Test/Harness/bin/prove perl-andy/lib/Test/Harness/bin/prove
--- perl-current/lib/Test/Harness/bin/prove 2008-02-11 12:00:19.000000000 -0500
+++ perl-andy/lib/Test/Harness/bin/prove 2008-06-26 09:08:55.000000000 -0400
@@ -240,6 +240,15 @@
$ prove -b --state=hot --state=all,save
+=head2 @INC
+
+prove introduces 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. Thus the perl which is running a
+test starts with the default C<@INC>. Additional library directories
+can be added either via the C<PERL5LIB> environment variable or via
+the C<-Ilib> option to F<prove>.
+
=head2 Taint Mode
Normally when a Perl program is run in taint mode the contents of the
--
Andy Dougherty doughera@lafayette.edu
> >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.