On Tue, Apr 16, 2002 at 09:47:32AM -0400, Ed Sickafus wrote:

> 2.) I want to insert my perlmod directory into @INC so I ...
> 
>       [esickafus perl5]$ echo $HOME
>       /home/sites/site10/users/esickafus
>       [esickafus perl5]$ export PERL5LIB=$HOME/perl5/perlmod
>       [esickafus perl5]$ echo $PERL5LIB
>       /home/sites/site10/users/esickafus/perl5/perlmod
> 
> .... seems logical to me, but when I check the results it appears that @INC
> has a mind of its own ...
> 
> [esickafus perl5]$ perl -V
> 
>           PERL5LIB="/home/sites/site10/users/esickafus/perl5/perlmod"
>         @INC:
>           /home/sites/site10/users/esickafus/perl5/perlmod/i386-linux         <---?!!
>           /home/sites/site10/users/esickafus/perl5/perlmod
>           /usr/lib/perl5/5.00503/i386-linux
>           /usr/lib/perl5/5.00503
>           /usr/lib/perl5/site_perl/5.005/i386-linux
>           /usr/lib/perl5/site_perl/5.005
>           .
> 
> Where'd the first entry in @INC come from?

RTFM.

perldoc lib

       For each directory in LIST (called $dir here) the lib
       module also checks to see if a directory called
       $dir/$archname/auto exists.  If so the $dir/$archname
       directory is assumed to be a corresponding architecture
       specific directory and is added to @INC in front of $dir.


> 3.) If I now try to run a simple script, missing file errors appear that
> $HOME/perl5/perlmod/ should be point to.
> 
>       [esickafus perl5]$ export PERL5LIB=$HOME/perl5/perlmod
> 
>       [esickafus perl5]$ perl srvtest.cgi
> 
>       Can't locate DB_FILE.pm in @INC (@INC contains:
> /home/sites/site10/users/esickaf
>       us/perl5/perlmod/i386-linux
> /home/sites/site10/users/esickafus/perl5/perlmod /us
>       r/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503
> /usr/lib/perl5/site_perl/5
>       .005/i386-linux /usr/lib/perl5/site_perl/5.005 .) at srvtest.cgi line 8.
>       BEGIN failed--compilation aborted at srvtest.cgi line 8.
> 
> Two DB_FILE.pm files exist, both pointed to by $HOME/perl5/perlmod but not
> by /i386-linux:
>       $HOME/perl5/perlmod/DB_FILE/DB_File-1.803/DB_File.pm
>       $HOME/perl5/perlmod/DB_FILE/DB_File-1.803/blib/lib/DB_File.pm

If this is where the DB_File.pm files are actually located, then they have
not been installed properly.  Modules are installed by following the
instructions in the module's INSTALL file, typically perl Makefile.PL,
make, make test, make install.


> 
> .... another bad day in the making.

@INC is a list of directories to search; adding directories will certainly
not hinder Perl in finding a file.

You are getting this error because you have spelled the name of the module
incorrectly:

>     Can't locate DB_FILE.pm in @INC (@INC contains:
                   ^^^^^^^

Perl is case-sensitive.


BTW, this question is not related to DBI and is therefore off-topic for
this mailing list.

Ronald

Reply via email to