@INC, is used within all cripts included in the script.

Look at Ronald's reply, that might be an issue as well.

Ilya

-----Original Message-----
From: Antonio Garcia [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 1:25 PM
To: Sterin, Ilya (I.)
Cc: [EMAIL PROTECTED]
Subject: RE: Module can't find itself



Actually, ~/perl does not have a directory in it called site_perl. In any
case it would not have to drill down, as with the @INC pointing to both
~/perl and ~/perl/DBI, it has access to two copies of DBI.pm.

The error is being thrown WITHIN DBI.pm, so clearly it is being
found...hence the confusion of how a module cannot find itself.

Is the @INC passed to all modules called within a script, or must @INC be
reconfigured within every module called? I can't imagine the latter is
true...

A.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Antonio Garcia-Martinez
cryptologia.com

On Thu, 5 Jun 2003, Sterin, Ilya (I.) wrote:

> Ah, I know what it is...
>
> go to ~/perl, you'll see that that directory has something like site_perl, etc... 
> drill down until you get to the part where DBI.pm is stored, and add that path.
>
> Ilya
>
> -----Original Message-----
> From: Antonio Garcia [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 05, 2003 1:18 PM
> To: Sterin, Ilya (I.)
> Cc: [EMAIL PROTECTED]
> Subject: RE: Module can't find itself
>
>
>
> But as the error messages show, the correct path is being added to @INC,
> regardless of the possible ambiguity in the use of $ENV{HOME}. A.
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Antonio Garcia-Martinez
> cryptologia.com
>
> On Thu, 5 Jun 2003, Sterin, Ilya (I.) wrote:
>
> > Well, $ENV{HOME} is specific to your environment.  If you are executing it through 
> > the server (browser), then it runs under a different environment.  Hardcoding the 
> > use lib part would be better.
> >
> > Ilya
> >
> > -----Original Message-----
> > From: Antonio Garcia [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, June 05, 2003 1:02 PM
> > To: [EMAIL PROTECTED]
> > Subject: Module can't find itself
> >
> >
> >
> > I am intalling DBI on a Sun workstation. Since I don't have root access, I
> > simply put DBI.pm in ~/perl, and then add it to @INC at runtime via
> >
> > use lib "$ENV{HOME}/perl";
> >
> > However, while my perl script finds DBI, DBI does not seem to find itself:
> >
> > [EMAIL PROTECTED]:/pseudo/ 96% perl loadFastaDB.pl
> > 2L_translation_dmel_RELEASE3-1.QUER
> > Y Drosophila tblastn_results
> > Can't locate loadable object for module DBI in @INC (@INC contains:
> > /home/agm/pe
> > rl /home/agm/perl/DBI /home/agm/perl /usr/perl5/5.00503/sun4-solaris
> > /usr/perl5/
> > 5.00503 /usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005
> > .) at
> >  /home/agm/perl/DBI/DBI.pm line 256
> > BEGIN failed--compilation aborted at /home/agm/perl/DBI/DBI.pm line 256.
> > BEGIN failed--compilation aborted at loadFastaDB.pl line 7.
> >
> >
> > Using the perl debugger:
> >
> > [EMAIL PROTECTED]:/pseudo/ 98% perl -d loadFastaDB.pl
> > 2L_translation_dmel_RELEASE3-1.QUERY Drosophila tblastn_results
> >
> > Loading DB routines from perl5db.pl version 1.0402
> > Emacs support available.
> >
> > Enter h or `h h' for help.
> >
> > Can't locate loadable object for module DBI in @INC (@INC contains:
> > /home/agm/perl /home/agm/perl/DBI /home/agm/perl
> > /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503
> > /usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .) at
> > /home/agm/perl/DBI/DBI.pm line 256
> >         Carp::croak('Can\'t locate loadable object for module DBI in @INC
> > (@INC conta...') called at /usr/perl5/5.00503/sun4-solaris/DynaLoader.pm
> > line 93
> >         DynaLoader::croak('Can\'t locate loadable object for module DBI in
> > @INC (@INC conta...') called at
> > /usr/perl5/5.00503/sun4-solaris/DynaLoader.pm line 144
> >         DynaLoader::bootstrap('DBI') called at /home/agm/perl/DBI/DBI.pm
> > line 249
> >         DBI::BEGIN() called at /home/agm/perl/DBI/DBI.pm line 256
> >         eval {...} called at /home/agm/perl/DBI/DBI.pm line 256
> >         require DBI/DBI.pm called at loadFastaDB.pl line 7
> >         main::BEGIN() called at /home/agm/perl/DBI/DBI.pm line 256
> >         eval {...} called at /home/agm/perl/DBI/DBI.pm line 256
> > BEGIN failed--compilation aborted at /home/agm/perl/DBI/DBI.pm line 256.
> >         require DBI/DBI.pm called at loadFastaDB.pl line 7
> >         main::BEGIN() called at /home/agm/perl/DBI/DBI.pm line 256
> >         eval {...} called at /home/agm/perl/DBI/DBI.pm line 256
> >         main::BEGIN() called at /home/agm/perl/DBI/DBI.pm line 7
> >         eval {...} called at /home/agm/perl/DBI/DBI.pm line 7
> > BEGIN failed--compilation aborted at loadFastaDB.pl line 7.
> > Debugged program terminated.  Use q to quit or R to restart,
> >
> >
> > Oddly, it seems there is an error within DBI, in that it can't find DBI.pm
> > (!).
> >
> > I have two copies of DBI.pm: ~/perl/DBI.pm and ~/perl/DBI/DBI.pm (if that
> > might have anything to do with it).
> >
> > Any ideas what to do to get DBI running?
> >
> > Thanks, A.
> >
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Antonio Garcia-Martinez
> > cryptologia.com
> >
>

Reply via email to