I'm building a web application using perl, apache2 and mod_perl2. I'm experiencing some weird stuff. When I run the app from the console, it works fine. Also using perl cgi instead of mod_perl it works fine.
When I use mod_perl I get a not found error, on the first "use"d module. All the modules are in the same dir as the .pl script, /www/domain/cgi-bin/.
When I insert "use lib '/www/domain/cgi-bin';" in the script, the app works fine. But I rather not have hardcoded paths in my script, that's what config files are for.
I tried to overcome this issue by using FindBin and FindBin::Real, and using the $0 var. But without success. The bizarre thing is that the following works:
use lib "/www/domain/cgi-bin";
but the following does NOT work:
my $path = "/www/domain/cgi-bin"; use lib $path;
and that freaks me out.
Could anyone shed some light on this please?
In reply to Strange issues with mod_perl and use lib by Farenji
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |