Hi, I rather new to perl but normally do other languages.
I have an issue with CPAN modules. A number of modules are compiled and installed into a build directory from a make file. This directory is not the default directory where perl is installed on Fedora 10. I can figure out is that the INC variable is populate correct expect when the module run's the test phase. Below is fragments and a short description. My main question is how can I modify the INC variable during the test phase. --- A make file (1) call CPAN for a module Test::Warn which includes Test::Exception. During the test script for TEST::Warn a error (2) occurred for Test::Exception Test::Exception is installed into a build lib just before make start to build Test::Warn In the makefile Perl is given -I$(DEST_LIB_DIR) for the module CPAN which is right. But the problem is that the second Makefile inside the CPAN module Test::Warn takes no notice of that. I can't change that due to it a downloaded thing. As a note. All had been working perfectly if the downloaded CPAN model had been installed on the default system location. The intention in this case is to build a second perl for later installing. Is there a way to change the path inside INC (3) /Simon Makefile (1) ======== .... DEST_LIB_DIR = /home/siyverts/src/fedora/src/zimbra/ZCS-P4-main/ThirdParty/Perl/zimbramon/lib .... # ... $$lib = Test::Warn .... echo -n "Compiling perl lib $$lib ..."; \ LDFLAGS="-fPIC" CFLAGS="-fPIC" BERKELEYDB_INCLUDE=$(BDB_INC) BERKELEYDB_LIB=$(BDB_LIB) $(PERL) -I$(DEST_LIB_DIR) -MCPAN -e \ " \ $$CPAN::Config->{make_arg}.=' CCCDLFLAGS=" -fPIC" CFLAGS="-fPIC" LDFLAGS="-fPIC"'; \ $$CPAN::Config->{makepl_arg}.=' CCCDLFLAGS="-fPIC" CFLAGS="-fPIC" LDFLAGS="-fPIC"'; \ force (\"install\", \"$$lib\") \ " \ >> $(LOGFILE) 2>&1; .... LOGFILE (2) ======= .... Installing /home/siyverts/src/fedora/src/zimbra/ZCS-P4-main/ThirdParty/Perl/zimbramon/lib/Test/Exception.pm Installing /home/siyverts/src/fedora/src/zimbra/ZCS-P4-main/ThirdParty/Perl/zimbramon/share/man/man3/Test::Exception.3pm .... CPAN.pm: Going to build C/CH/CHORNY/Test-Warn-0.11.tar.gz Checking if your kit is complete... Looks good Warning: prerequisite Test::Exception 0 not found. Writing Makefile for Test::Warn make[2]: Entering directory `/home/siyverts/src/fedora/src/zimbra/ZCS-P4-main/ThirdParty/Perl/.cpan/build/Test-Warn-0.11-yaB4QJ' cp Warn.pm blib/lib/Test/Warn.pm Manifying blib/man3/Test::Warn.3pm make[2]: Leaving directory `/home/siyverts/src/fedora/src/zimbra/ZCS-P4-main/ThirdParty/Perl/.cpan/build/Test-Warn-0.11-yaB4QJ' CHORNY/Test-Warn-0.11.tar.gz /usr/bin/make -- OK Running make test make[2]: Entering directory `/home/siyverts/src/fedora/src/zimbra/ZCS-P4-main/ThirdParty/Perl/.cpan/build/Test-Warn-0.11-yaB4QJ' PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/1................ok t/carped...........ok t/pod..............skipped: Test::Pod 1.14 required for testing POD t/warning_is.......Can't locate Test/Exception.pm in @INC (@INC contains: ../blib/lib /home/siyverts/src/fedora/src/zimbra/ZCS-P4-main/ThirdParty/Perl/.cpan/build/Test-Warn-0.11-yaB4QJ/blib/lib /home/siyverts/src/fedora/src/zimbra/ZCS-P4-main/ThirdParty/Perl/.cpan/build/Test-Warn-0.11-yaB4QJ/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/vendor_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. BEGIN failed--compilation aborted at t/warning_is.t line 28. # Looks like your test died before it could output anything. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 48/48 subtests ..... INC (3) === [siyve...@domain ~]$ perl -e 'print join "\n", @INC; print"\n"' /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/vendor_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 .