Mar 17, 2005, 6:34 PM
Post #1 of 2
I've been programming under regular Perl for quite awhile and just recently installed mod_perl. I'm having an insane problem with require()-ing some configuration and subroutine files.
I have statements at the beginning of my programs like this:
It works perfectly under CGI-Perl, but under mod_perl, it cannot ever find the file. (Cannot find ./require/file1.pl...). Magically, if I put the 'required' files in the same directory as the scripts that require them, it works, even if I put a full path or relative path in front of the filename.
In addition: if I change the "require" to "do", it seems to be able to find the file, but then it gives me an error about undefined subroutines when I try to use them. Again, if I put the file in the same directory, all works ok!
Can any body explain this?