Hi folks,
A noobie question here:
I have a plain simple cgi script in a directory configured for
Modperl::Registry:
--------------------
#!/usr/local/bin/perl
use strict;
use warnings
use lib '../lib';
use MyApp;
print "Content-type: text/html\n\n";
print "hello\n";
---------------------
This script runs correctly under mod_cgi (without mod_perl), implying that
perl is able to locate MyApp.pm through use lib '../lib';
Now under mod_perl with PerlSwitches -I/Users/mehryar/Sites/lib
the script runs correctly as well - but only if I comment out the
'use lib...' line. Implying again that mod_perl was able to locate MyApp.pm
through the -I/Users/mehryar/Sites/lib.
But what I don't understand is why it fails if the use lib '../lib'; line
is present in the script?
I get the following error:
Can't locate MyApp.pm: Permission denied at /Users/mehryar/Sites/cgi/test.cgi
(This is on my Mac mod_perl2.0.10/Apache2.4.23)
Reading the docs on how @INC is modified is getting me nowhere.
cheers,
-Mehryar
A noobie question here:
I have a plain simple cgi script in a directory configured for
Modperl::Registry:
--------------------
#!/usr/local/bin/perl
use strict;
use warnings
use lib '../lib';
use MyApp;
print "Content-type: text/html\n\n";
print "hello\n";
---------------------
This script runs correctly under mod_cgi (without mod_perl), implying that
perl is able to locate MyApp.pm through use lib '../lib';
Now under mod_perl with PerlSwitches -I/Users/mehryar/Sites/lib
the script runs correctly as well - but only if I comment out the
'use lib...' line. Implying again that mod_perl was able to locate MyApp.pm
through the -I/Users/mehryar/Sites/lib.
But what I don't understand is why it fails if the use lib '../lib'; line
is present in the script?
I get the following error:
Can't locate MyApp.pm: Permission denied at /Users/mehryar/Sites/cgi/test.cgi
(This is on my Mac mod_perl2.0.10/Apache2.4.23)
Reading the docs on how @INC is modified is getting me nowhere.
cheers,
-Mehryar