If you are using bash as you shell, something like:
export PERL5LIB=${PERL5LIB}:/usr/local/project/packages
That will set the global search path for perl to find modules to include
'/usr/local/project/packages'.
However, the better way to handle this is to set up a directory that you use
for
Hi,
I'm working in a project and i want include a directory (my modules) to perl's
search path.
I have this structure:
/usr/local/project
/usr/local/project/packages
Then i create a index.cgi on root folder with the theses lines:
#!/usr/bin/perl
use strict;
use Cwd;
use lib
Augusto Flavio wrote:
Hi,
I'm working in a project and i want include a directory (my modules) to
perl's search path.
I have this structure:
/usr/local/project
/usr/local/project/packages
Then i create a index.cgi on root folder with the theses lines:
#!/usr/bin/perl
use
in the third example and that one derived in the fourth
example. So, why does $Bin get added to @INC before the program tries to
load Some_Module_In_lib_Dir, and $file_path does not?
Up On The Mountain Design Group
Custom solutions for your database driven web site.
Ron Goral
[EMAIL PROTECTED]
Tel
, Perl is so cool) that it knows to
compile and execute the whole line.
use Some_Module_In_lib_Dir;
If $Bin and $file_path are printed to screen, they show values
identical to
the path used in the third example and that one derived in the fourth
example. So, why does $Bin get added to @INC
-Original Message-
From: Wiggins d Anconia [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 16, 2004 9:03 AM
To: Ron Goral; Perl Beginners; [EMAIL PROTECTED]
Subject: Re: Need some help using lib to add custom directories to @INC
Please only post to one group, if that group
-Original Message-
From: Wiggins d Anconia [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 16, 2004 9:03 AM
To: Ron Goral; Perl Beginners; [EMAIL PROTECTED]
Subject: Re: Need some help using lib to add custom directories to @INC
Please only post to one group
:
---
--#perl mrtg_total.pl /test.cfg
Can't locate GD.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386
-5.2.1-4
libgd-2.0.20-2
So it seems that my RPMs are ok or ?
When I run my perl script, this is what I got:
---
--#perl mrtg_total.pl /test.cfg
Can't locate GD.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i386-linux
-5.2.1-4
libgd-2.0.20-2
So it seems that my RPMs are ok or ?
When I run my perl script, this is what I got:
---
--#perl mrtg_total.pl /test.cfg
Can't locate GD.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i386-linux
Hi,
I'm trying to use GD.pm on a RedHat 9.0 Linux machine in a Perl script.
When the script is executed, it drops out with the message:
Can't locate GD.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux
place them anywhere in my program directory and
indicate the location in my scripts e.g.
#!/usr/bin/perl -w
push(@INC, MyLibDir);
require mymodule.pm;
###
But one thing that am not sure of is: Do I need push(@INC,
MyLibDir);in all my scripts or is it enough only
perldoc lib
Recently I read somewhere that, instead of always moving my modules to
/usr/lib/perl/, I could place them anywhere in my program directory and
indicate the location in my scripts e.g.
#!/usr/bin/perl -w
push(@INC, MyLibDir);
require mymodule.pm;
###
But one
to force @INC to look at the directory of your DBI library, use:
use lib your DBI directory
along the top of your script
david
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
or can try
push @INC, 'the/path/you/want';
Rgds,
Connie
- Original Message -
From: root [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 20, 2002 2:19 AM
Subject: Re: Can't locate loadable object DBD::mysql in @INC
to force @INC to look at the directory of your DBI
push @INC, 'the/path/you/want'
is different than:
use lib 'the/path/you/want'
from a user's perspective, they are the same but they are not under the
hood. what happen is that that push statement is a run time statement.
the use lib statement is a compile time statement. don't confuse the 2
aka, use lib is like placing the push in a BEGIN blockwhich I think
was the old way of doing things...
David Zhuo wrote:
push @INC, 'the/path/you/want'
is different than:
use lib 'the/path/you/want'
from a user's perspective, they are the same but they are not under the
hood
@INC, 'the/path/you/want'
is different than:
use lib 'the/path/you/want'
from a user's perspective, they are the same but they are not under the
hood. what happen is that that push statement is a run time statement.
the use lib statement is a compile time statement. don't confuse
message showed
up in the mailing list? i am new to this mailing list :-)
david
On Mon, 2002-08-19 at 14:38, Wiggins d'Anconia wrote:
aka, use lib is like placing the push in a BEGIN blockwhich I think
was the old way of doing things...
David Zhuo wrote:
push @INC, 'the/path/you/want
message showed
up in the mailing list? i am new to this mailing list :-)
david
On Mon, 2002-08-19 at 14:38, Wiggins d'Anconia wrote:
aka, use lib is like placing the push in a BEGIN blockwhich I think
was the old way of doing things...
David Zhuo wrote:
push @INC
at 14:38, Wiggins d'Anconia wrote:
aka, use lib is like placing the push in a BEGIN blockwhich I think
was the old way of doing things...
David Zhuo wrote:
push @INC, 'the/path/you/want'
is different than:
use lib 'the/path/you/want'
from a user's perspective, they are the same
in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux
/usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux
/usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at (eval 1)
line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a module that DBD::mysql requires hasn't
Changing @INC would work, but to save yourself hassle later and possibly
to avoid further problems you might consider upgrading/re-installing
DBI, and DBD-mysql through CPAN as well, as that should fix the problems
and keep your CPAN installation contiguous, aka you upgraded Perl
through CPAN
(mysql) failed: Can't locate loadable object for module
DBD::mysql in @INC (@INC contains: /usr/lib/perl5
All knowing Perl Gurus,
I installed Perl 5.6.1 and now nothing in @INC is being seen. I am
receiving the following error to be specific:
Can't locate strict.pm in @INC (@INC contains:
/usr/local/lib/perl5/5.6.1/i486-linux /usr/local/lib/perl5
/5.6.1 /usr/local/lib/perl5/site_perl/5.6.1/i486
::Graph
o installed into: /usr/local/lib/perl5/site_perl/5.6.1
o LINKTYPE: dynamic
o VERSION: 1.33
o EXE_FILES:
When I run the program, here is what I get:
# /admin/sarge_v0.53/httpdocs/bin/sarge.ustuld_1
Can't locate loadable object for module GD in @INC (@INC contains:
/usr/local
pAuLyOYo wrote:
I did download CGI.pm but, is a version for UNIX, i
use Windows, is there a version for windows
What do you mean for Unix? There is only one version of CGI.pm, it's
been tested under Linux, Solaris, OpenBSD, HPUX, Darwin, MacOS, SunOS,
Irix and Win32 and works on a lot of
show me this:
...
It looks like there was an error:
Your script produced this error: Can't locate CGI.pm
in @INC (@INC contains: .) at ./guestbook.cgi line 5.
BEGIN failed--compilation aborted at ./guestbook.cgi
line 5.
...
The fifth line is
use CGI qw(:standart
there was an error:
Your script produced this error: Can't locate CGI.pm
in @INC (@INC contains: .) at ./guestbook.cgi line 5.
BEGIN failed--compilation aborted at ./guestbook.cgi
line 5.
..
The fifth line is
use CGI qw(:standart);
there is the problem i guess...
This is my code
locate CGI.pm
in @INC (@INC contains: .) at ./guestbook.cgi line 5.
BEGIN failed--compilation aborted at ./guestbook.cgi
line 5.
..
The fifth line is
use CGI qw(:standart);
qw(:standard), not standart.
there is the problem i guess...
This is my code:
#/usr/bin/pearl -w
For some
reason you have only . (current
working directory) in your @INC, so when you use CGI; perl is looking
for CGI.pm only in current working dir:
..
It looks like there was an error:
Your script produced this error: Can't locate CGI.pm
in @INC (@INC contains: .) at ./guestbook.cgi line 5
31 matches
Mail list logo