in reply to Can't locate module in @INC

I need it actually to be set up at the system level and not in code using use and the path (as I go I need everything working - don't ask :-)).

Replies are listed 'Best First'.
Re^2: Can't locate module in @INC
by ikegami (Patriarch) on Dec 09, 2009 at 17:42 UTC
    use Cwd qw( realpath ); use File::Basename qw( dirname ); my $script_dir; BEGIN { $script_dir = dirname(realpath($0)); } use lib $script_dir;

    It's in your script, but nothing's hardcoded. Otherwise, consult your web server's documentation on how to set an environment variable for the CGI script.