in reply to Run a custom module outside of the cgi-bin

If you have not installed the module in a location that Perl can find it, the module will not be loaded. If you are not installing it in the shared site lib directory you can add the use lib to look for the module in another location.

#!/usr/bin/perl # You install Foo::Bar at /home/painthappy/perl/lib/Foo/Bar.pm use lib '/home/painthappy/perl/lib'; use Foo::Bar;

Replies are listed 'Best First'.
Re^2: Run a custom module outside of the cgi-bin
by painthappy (Novice) on Jan 21, 2007 at 02:01 UTC
    Ah.. nice.. the use lib worked! Thank you. I thought I was fine with just using: require "/home/my/directory/vTest.pm"; And that seemed to work, but I've been shown that isn't the correct way. Great! Thank you so much!