in reply to use lib in modules
Maybe you are trying to dynamically resolve the path to the lib.. like $ENV{HOME}/mystuff/lib, if you're running as apache, it won't work, HOME won't be set. But DOCUMENT_ROOT will be...
If you have stuff in /home/username/lib you could do..
#!/usr/bin/perl use lib '../lib'; use HereThingOnly;
Which would work in /home/username/cgi-bin/* scripts
Then there would be a symlink at
/home/username/public_html/cgi-bin
Here's another possible solution.. BEGIN { $|=1; use CGI::Carp qw(fatalsToBrowser); eval qq|use lib "$ENV{DOCUMENT_ROOT}/../lib";|; }
Hope that helps.
|
|---|