For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > September 2004 > how to change values of @INC









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author how to change values of @INC
Bernd Mueller

2004-09-22, 3:57 pm


Hello,

I am trying to run a perl script under apache2 and the error_log tells me
something about :
"Can't locate SiteDefs.pm in @INC (@INC contains:
/usr/local/lib/perl5/5.8.5/x86_64-linux etc ...) at
/usr/local/ensembl/perl/multi/unisearch line24., referer: http://localhost/
....
BEGIN failed--compilation aborted at ..."

Would someone be so nice to explain me how i change the values in @INC,
because i know where to find this SiteDefs.pm.

Best Regards,
Bernd
Raymond Raj

2004-09-22, 3:57 pm


you can add new search path using=20
use lib 'path List';

for delete=20

no lib 'path list';


Raymond

-----Original Message-----
From: Bernd Mueller [mailto:bernd@nii.ac.jp]
Sent: Wednesday, September 22, 2004 8:04 PM
To: beginners@perl.org
Subject: how to change values of @INC=20



Hello,

I am trying to run a perl script under apache2 and the error_log tells =
me =20
something about :
"Can't locate SiteDefs.pm in @INC (@INC contains: =20
/usr/local/lib/perl5/5.8.5/x86_64-linux etc ...) at =20
/usr/local/ensembl/perl/multi/unisearch line24., referer: =
http://localhost/
....
BEGIN failed--compilation aborted at ..."

Would someone be so nice to explain me how i change the values in @INC, =

because i know where to find this SiteDefs.pm.

Best Regards,
Bernd

--=20
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Thomas Bätzler

2004-09-22, 3:57 pm


Bernd Mueller <bernd@nii.ac.jp> asked:
> Would someone be so nice to explain me how i change the
> values in @INC, because i know where to find this SiteDefs.pm.


You could use the "use lib" pragma, like

use lib qw(/path/to/my/modules);

HTH,
Thomas
JupiterHost.Net

2004-09-22, 3:57 pm



Bernd Mueller wrote:
>
> Hello,


Hello,

> I am trying to run a perl script under apache2 and the error_log tells
> me something about :
> "Can't locate SiteDefs.pm in @INC (@INC contains:
> /usr/local/lib/perl5/5.8.5/x86_64-linux etc ...) at
> /usr/local/ensembl/perl/multi/unisearch line24., referer: http://localhost/
> ...
> BEGIN failed--compilation aborted at ..."
>
> Would someone be so nice to explain me how i change the values in @INC,
> because i know where to find this SiteDefs.pm.


use lib '/dir/you/want';

HTH :)

Lee.M - JupiterHost.Net
Johannes Lichtenberger

2004-09-22, 3:57 pm

Bernd Mueller wrote:

> I am trying to run a perl script under apache2 and the error_log tells
> me something about :
> "Can't locate SiteDefs.pm in @INC (@INC contains:
> /usr/local/lib/perl5/5.8.5/x86_64-linux etc ...) at
> /usr/local/ensembl/perl/multi/unisearch line24., referer:
> http://localhost/
> ...
> BEGIN failed--compilation aborted at ..."
>
> Would someone be so nice to explain me how i change the values in
> @INC, because i know where to find this SiteDefs.pm.


perldoc lib
perldoc FindBin
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com