in reply to Re: CPAN Bundles and Module Dependencies
in thread CPAN Bundles and Module Dependencies

Diagnosis:

  1. cpan[2]> install Params::Validate CPAN: Storable loaded ok Going to read /home/me/.cpan/Metadata Database was generated on Wed, 07 Mar 2007 11:09:19 GMT Running install for module Params::Validate Running make for D/DR/DROLSKY/Params-Validate-0.87.tar.gz <snipped a bunch of stuff> Running make install Installing /home/me/build/perl-addons/inst/usr/local/lib/perl5/site_pe +rl/5.8.8/Params/ValidatePP.pm Installing /home/me/build/perl-addons/inst/usr/local/lib/perl5/site_pe +rl/5.8.8/Params/Validate.pm Installing /home/me/build/perl-addons/inst/usr/local/lib/perl5/site_pe +rl/5.8.8/Params/ValidateXS.pm Installing /home/me/build/perl-addons/inst/usr/local/lib/perl5/site_pe +rl/5.8.8/Attribute/Params/Validate.pm Installing /home/me/build/perl-addons/inst/usr/local/share/man/man3/At +tribute::Params::Validate.3 Installing /home/me/build/perl-addons/inst/usr/local/share/man/man3/Pa +rams::ValidatePP.3 Installing /home/me/build/perl-addons/inst/usr/local/share/man/man3/Pa +rams::Validate.3 Installing /home/me/build/perl-addons/inst/usr/local/share/man/man3/Pa +rams::ValidateXS.3 Writing /home/me/build/perl-addons/inst/usr/local/lib/perl5/site_perl/ +5.8.8/sun4-solaris/auto/Params/Validate/.packlist Appending installation info to /home/me/build/perl-addons/inst/usr/loc +al/lib/perl5/5.8.8/sun4-solaris/perllocal.pod /usr/local/bin/make install DESTDIR=/home/me/build/perl-addons/inst +-- OK
  2. (From a different UNIX shell)
    [me@unixbox1:/home/me]> find /home/me/build/perl-addons/inst -name 'Va +lidate.pm' /home/me/build/perl-addons/inst/usr/local/lib/perl5/site_perl/5.8.8/Pa +rams/Validate.pm /home/me/build/perl-addons/inst/usr/local/lib/perl5/site_perl/5.8.8/At +tribute/Params/Validate.pm
  3. (Back to original CPAN shell)
    cpan[4]> ! print $ENV{PERL5LIB} /home/me/build/perl-addons/inst/usr/local/lib/perl5:/home/me/build/per +l-addons/inst/usr/local/lib/perl5/site_perl cpan[4]> ! use Params::Validate; print "$Params::Validate::VERSION\n" Can't locate Params/Validate.pm in @INC (@INC contains: /home/me/build +/perl-addons/inst/usr/local/lib/perl5/5.8.8/sun4-solaris /home/me/bui +ld/perl-addons/inst/usr/local/lib/perl5/5.8.8 /home/me/build/perl-add +ons/inst/usr/local/lib/perl5 /home/me/build/perl-addons/inst/usr/loca +l/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/sun4-solaris /usr/lo +cal/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris + /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl +/home/me) at (eval 27) line 1, <FIN> line 9. BEGIN failed--compilation aborted at (eval 27) line 1, <FIN> line 9.
I didn't see the point of continuing with the rest of the diagnosis; the issue appears to be that Params::Validate isn't found after it just got done installing. Some additional information:
cpan[4]> ! use Params::Validate; print $Params::Validate::VERSION Can't locate Params/Validate.pm in @INC (@INC contains: /home/me/build +/perl-addons/inst/usr/local/lib/perl5/5.8.8/sun4-solaris /home/me/bui +ld/perl-addons/inst/usr/local/lib/perl5/5.8.8 /home/me/build/perl-add +ons/inst/usr/local/lib/perl5 /home/me/build/perl-addons/inst/usr/loca +l/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/sun4-solaris /usr/lo +cal/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris + /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl +/home/me) at (eval 27) line 1, <FIN> line 9. BEGIN failed--compilation aborted at (eval 27) line 1, <FIN> line 9. cpan[4]> q Terminal does not support GetHistory. Lockfile removed. [me@unixbox1:/home/me]> perl -MCPAN -e 'shell' Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v1.8802) ReadLine support available (try 'install Bundle::CPAN') cpan[1]> ! use Params::Validate; print "$Params::Validate::VERSION\n" 0.87
I guess that I don't know how to interpret what I'm seeing. I know it's not working according to my expectations, but is this a bug?

Replies are listed 'Best First'.
Re^3: CPAN Bundles and Module Dependencies
by xdg (Monsignor) on Mar 07, 2007 at 19:16 UTC

    Interesting. The installer seems to install into site_perl/5.8.8 but your Perl doesn't expand your PERL5LIB the same way.

    # physical file (from #2) /home/me/build/perl-addons/inst/usr/local/lib/perl5/site_per­l/5.8.8/P +arams/Validate.pm # PERL5LIB (from #3) /home/me/build/perl-addons/inst/usr/local/lib/perl5 /home/me­/build/perl-addons/inst/usr/local/lib/perl5/site_perl # Can't find in INC (from #3) # First PERL5LIB path is expanded # Second is not /home/me/build/perl-addons/inst/usr/local/lib/perl5/5.8.8/su­n4-solari +s /home/me/build/perl-addons/inst/usr/local/lib/perl5/5.8.8 /home/me/build/perl-addons/inst/usr/local/lib/perl5 /home/me/build/perl-addons/inst/usr/local/lib/perl5/site_per­l

    Off the top of my head, I'm not sure why your site_perl in PERL5LIB isn't being expanded with the version number. Maybe something in how your Perl was configured?

    What is the output of perl -V?

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

      I've been removing some of the additional @INC paths that we built into Perl to protect our environment a little, but I'll include them here, changed, for the sake of thoroughness.
      [me@unixbox1:/home/me]> perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=solaris, osvers=2.8, archname=sun4-solaris uname='sunos unixbox1 5.8 generic_117350-44 sun4u sparc sunw,ultra +-250 ' config_args='-d -Dotherlibdirs=/home/app_1:/home/app_2 -Dinc_versi +on_list=none -Dperladmin=brainsick@local.domain' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultipl +icity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='/opt/SUNWspro/bin/cc', ccflags ='-I/usr/local/include -D_LARGE +FILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O', cppflags='-I/usr/local/include' ccversion='Sun C 5.7 2005/01/07', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +6 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='/opt/SUNWspro/bin/cc', ldflags =' -L/usr/lib -L/usr/ccs/lib -L +/opt/SUNWspro/prod/lib/v8plus -L/opt/SUNWspro/prod/lib -L/lib -L/usr/ +local/lib ' libpth=/usr/lib /usr/ccs/lib /opt/SUNWspro/prod/lib/v8plus /opt/SU +NWspro/prod/lib /lib /usr/local/lib libs=-lsocket -lnsl -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-KPIC', lddlflags='-G -L/usr/lib -L/usr/ccs/lib -L/opt +/SUNWspro/prod/lib/v8plus -L/opt/SUNWspro/prod/lib -L/lib -L/usr/loca +l/lib' Characteristics of this binary (from libperl): Compile-time options: PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO Built under solaris Compiled at Jan 18 2007 07:45:13 %ENV: PERL5LIB="/home/me/build/perl-addons/inst/usr/local/lib/perl5:/hom +e/me/build/perl-addons/inst/usr/local/lib/perl5/site_perl" @INC: /home/me/build/perl-addons/inst/usr/local/lib/perl5/5.8.8/sun4-sol +aris /home/me/build/perl-addons/inst/usr/local/lib/perl5/5.8.8 /home/me/build/perl-addons/inst/usr/local/lib/perl5 /home/me/build/perl-addons/inst/usr/local/lib/perl5/site_perl/5.8. +8/sun4-solaris /home/me/build/perl-addons/inst/usr/local/lib/perl5/site_perl/5.8. +8 /home/me/build/perl-addons/inst/usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.8.8/sun4-solaris /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl /home/app_1 /home/app_2 .
      I'm still not understanding why quitting the CPAN shell and restarting it causes the module to be found.