siyverts has asked for the wisdom of the Perl Monks concerning the following question:

CPAN generate a fault during test in Test-Warn-0.11

t/warning_is.......Can't locate Test/Exception.pm in @INC (@INC contai +ns: ../blib/lib /home/siyverts/src/fedora/src/zimbra-6-F10/ThirdParty +/Perl.new/.cpan/build/Test-Warn-0.11-4y883K/blib/lib /home/siyverts/s +rc/fedora/src/zimbra-6-F10/ThirdParty/Perl.new/.cpan/build/Test-Warn- +0.11-4y883K/blib/arch /usr/lib/perl5/5.10.0/i386-linux-thread-multi / +usr/lib/perl5/5.10.0 /usr/local/lib/perl5/site_perl/5.10.0/i386-linux +-thread-multi /usr/local/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/ve +ndor_perl/5.10.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5 +.10.0 /usr/lib/perl5/vendor_perl /usr/local/lib/perl5/site_perl /usr/ +lib/perl5/site_perl .) at t/warning_is.t line 28.
This is because Test/Exception.pm is located at a
temporary build directory where it was stored
from previous step.
How can I tell CPAN to add a path during the test phase?
LDFLAGS="-fPIC" CFLAGS="-fPIC" BERKELEYDB_INCLUDE=$(BDB_INC) BERKELEYD +B_LIB=$(BDB_LIB) $(PERL) -I$(DEST_LIB_DIR) -MCPAN -e "$$CPAN::Config- +>{make_arg}.=' CCCDLFLAGS="-fPIC" CFLAGS="-fPIC" LDFLAGS="-fPIC"'; $$ +CPAN::Config->{makepl_arg}.=' PERL5LIB="$(DEST_LIB_DIR)" CCCDLFLAGS=" +-fPIC" CFLAGS="-fPIC" LDFLAGS="-fPIC"'; force (\"install\", \"$$lib\" +)" >> $(LOGFILE) 2>&1; \

Replies are listed 'Best First'.
Re: CPAN and @INC
by ikegami (Patriarch) on Apr 10, 2009 at 20:27 UTC

    Test::Exception should either be installed or in ../blib/lib. What's this temporary build directory to which you refer?

    Anyway, why don't you just install Test::Exception first.

Re: CPAN and @INC
by Bloodnok (Vicar) on Apr 10, 2009 at 23:35 UTC
    ikegamis most pertinent observations aside, if you really must have Test::Exception installed elsewhere, what's up with using the PERL5LIB environment variable ??

    A user level that continues to overstate my experience :-))