Hi again,

Thanks for your suggestions Clint. I have tried some more things and it
doesn't work yet. 

In my httpd.conf file I have this configuration:

PerlSwitches -wT
PerlPostConfigRequire
/usr/local/apache2/htdocs/www/p_scripts/perl-cgi/startup.pl
<Directory
"/usr/local/apache2/htdocs/www/p_scripts/perl-cgi/">
        SetHandler perl-script
        PerlResponseHandler ModPerl::Registry
        PerlOptions +ParseHeaders
        Options +ExecCGI
        Order allow,deny
        Allow from all
</Directory>

Here I have tried with 
PerlSwitches -w 
and with 
PerlSwitches
-I/usr/local/apache2/htdocs/www/p_scripts/perl-cgi/
and it doesn't work.

I have also put 

warn (join ("\n",@INC));

before require, and every time @INC doesn't include my folder. I have
also moved 'perl_functions.pl' to the current folder where it is called
from and I get the same error,

Can't locate perl_functions.pl 

Any more ideas?

I have found a perl module called perl5lib and I am wondering if it will
work with mod_perl2.

Thanks for your help.
Regards.

> On Mon, 2007-05-28 at 12:36 +0200, Alicia Amadoz wrote:
> > Hi,
> > 
> > I have tried with adding the directory where perl_functions.pl lives in
> > my startup.pl file. Again, the error is the following:
> > 
> > Can't locate perl_functions.pl in @INC
> 
> So you need to examine @INC to see what is missing.
> 
> just before your require, try adding this:
> 
>    warn (join ("\n",@INC));
> 
> This will print a list of the directories in @INC and you can see
> whether the directory that you want is in the list.
> 
> You don't say whether you are using this under Registry or not. I'm not
> sure how you are using startup.pl, but maybe the changes in @INC are
> being lost after you use it?
> 
> Also, have a look here:
> 
> http://perl.apache.org/docs/2.0/user/config/config.html#Adjusting_C__INC_
> 
> > I have also tried with the absolute path at require "path"; in
> > 'search.pl' and it works ok. But I need to work with relative paths or
> > with a unique declaration of this path because the paths are going to
> > change. What can I do in this case?
> > 
> > Regards.
> > 
> > 
> 
> buena suerte
> 
> clint (de barcelona)
> 
> 
> 


Reply via email to