develooper Front page | perl.perl5.porters | Postings from March 2011

PERL5LIB env variable import possibly broken for large contents onWin32? ( Was: Re: Your CPAN smoker is misconfigured? )

Christian Walde
March 30, 2011 01:55
PERL5LIB env variable import possibly broken for large contents onWin32? ( Was: Re: Your CPAN smoker is misconfigured? )
Message ID:
On Wed, 30 Mar 2011 02:22:32 +0200, <> wrote:

> Hello,
>     I just got this FAIL report today from CPANTesters:
>     As you can see, the prereq is correctly recognized by the toolchain
> and loaded - it's even in the lengthy @INC list, BUT when executing the
> test script it seems like @INC disappears somehow? Since I don't know
> the details of your setup I have to assume something is broken.
>     Can you verify that it's not a problem with just my module? There's
> no easy way to search the cpantesters database for all of your reports
> so I can check to see if you've been sending bad FAILs or not. Can you
> please test my module by hand to see if it really works? Thanks!
>     I suspect it's something to do with MSWin32 limitations, as I have
> received several other FAILs in the past with the same symptoms as this
> one. However, as I don't have access to a box now I can't quickly test
> my theory out. I have sent an email to the list several weeks ago but
> seems like everyone was busy :(
>     The subject was "Weird failures from smokers on MSWin32?"
>     Thanks again for your assistance with this and again, BIG THANKS for
> running a smoker! :)
> ~Apocalypse

I reproduced this case and it seems that this might actually be a Perl bug. Situation is as follows:

My CPAN is still 1.9402 and configured to reuse_build_dir.

This means that in order to run a test on a module, it will throw *all* the build dirs in ~/.cpan/build into $ENV{PERL5LIB}, which i understand is added to @INC by the perl executable itself. ( )

Reproduction thus was relatively easy:

Stop the smoker, run cpan, `look` at an affected dist, in my example Params::Classify and `make test`. In order to make the output more useful i added debug statements to and gutted the test suite of Params::Classify, replacing it with a single test that tries to use the module and dumps environment and INC information. Here's the output:

Of note: The test ( ) clearly has a whole battery of directories in $ENV{PERL5LIB} ( ) which the perl executable can obviously see, including the Params::Classify dir as the very first; since that's a Data::Dumper output of %ENV. However @INC remains unchanged by that. ( )

This seems to indicate to me that the perl executable itself is, for whatever reason, flat out ignoring the PERL5LIB and/or failing to inject it into @INC. Other possibilities include Module::Build messing things up or the Windows Perl executable exclusively having issues.

I do not know how to further pursue this issue, but will happily provide any assistance needed in digging deeper into this.

(And for now will try to at least follow up bugs FAIL reports with proper PASSes by periodically cleaning out /build and removing fails from my reports-sent.db.)

With regards,
Christian Walde Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About