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

I tried "cpan Data::Dumper" (example) to install this module to my personal library directory (PREFIX is set correctly). Using CPAN 1.76, Solaris 5.7, PERL 5.6.1 I'm not root, so upgrading to a newer OS or PERL version is not an option at the moment.

It fails in the "make test" section complaining that Test::More is is not in @INC. It dumps @INC and sure enough, my personal libraries (where Test::More is located) are not listed, even though my PERLLIB points to them.

If I go to the cpan module's build directory that was automatically created for Data::Dumper and manually run "make test", all works fine ... it picks up my PERLLIB as I'd expect and thus finds Test::More.

Am I missing some config option for the CPAN module?

  • Comment on CPAN module, make test, ignores PERLLIB?

Replies are listed 'Best First'.
Re: CPAN module, make test, ignores PERLLIB?
by brian_d_foy (Abbot) on Mar 17, 2005 at 19:37 UTC

    What is your exact command line? Are you using my cpan script (the command named "cpan") or something else?

    What's in your CPAN.pm configuration? You can get that from the CPAN.pm shell:

    $ perl -MCPAN -e shell cpan> o conf
    --
    brian d foy <bdfoy@cpan.org>
      Command line:

      /expsys/local/perl5/bin/cpan Data::Dumper

      Also tried:

      /usr/bin/perl -MCPAN -e 'install Data::Dumper'

      ... but this fails with:

      Can't locate object method "install" via package "Data::Dumper" (perhaps you for got to load "Data::Dumper"?) at -e line 1.

      ... although it has worked for other modules (besides Data::Dumper)

      cpan> o conf CPAN::Config options from /expsys/local/perl5/lib/5.6.1/CPAN/Config.pm +: commit Commit changes to disk defaults Reload defaults from disk init Interactive setting of all options build_cache 10 build_dir /home/exp/.cpan/build cache_metadata 1 cpan_home /home/exp/.cpan dontload_hash ftp /usr/5bin/ftp ftp_proxy co.proxy.xxxxx.com getcwd cwd gzip /expert/bin/gzip histfile /home/exp/.cpan/histfile histsize 100 http_proxy co.proxy.xxxxx.com inactivity_timeout 0 index_expire 1 inhibit_startup_message 0 keep_source_where /home/exp/.cpan/sources lynx /expert/bin/lynx make /usr/local/bin/make make_arg make_install_arg UNINST=1 makepl_arg PREFIX=/expsys/local/perl5 ncftp ncftpget no_proxy pager /usr/5bin/pg prerequisites_policy ask proxy_user scan_cache atstart shell /usr/bin/ksh tar /usr/5bin/tar term_is_latin 1 unzip /expert/bin/unzip urllist ftp://ftp.cs.colorado.edu/pub/perl/CPAN/ ftp://ftp.ibiblio.org/pub/languages/perl/CPAN http://www.perl.com/CPAN/ wget /expert/bin/wget cpan>
Re: CPAN module, make test, ignores PERLLIB?
by Fletch (Bishop) on Mar 17, 2005 at 21:55 UTC

    Just to toss out a possibility, perhaps something has defined PERL5LIB and that's overriding your PERLLIB (see perldoc perlrun for more details).

      I tried setting PERL5LIB, then PERLLIB, then both ... to no avail. My environment should be the same for both the failing "cpan" command and the successful manual "make test" command, since I'm running one right after the other at the command prompt of the same login shell.