in reply to Re^4: script fails loading module version, but > version is installed
in thread script fails loading module version, but > version is installed

1) enviroment 2) shebang

perlrun/perlintro

shebang Path variable

Tutorials > CGI Programming > CGI Help Guide, Troubleshooting Perl CGI scripts

  • Comment on Re^5: script fails loading module version, but > version is installed

Replies are listed 'Best First'.
Re^6: script fails loading module version, but > version is installed
by Allasso (Monk) on Jun 30, 2011 at 16:46 UTC
    I see....

    yes, when I run:

    /usr/bin/perl -e 'use CGI ; print $INC{"CGI.pm"}."\n" ; '

    (the path following shebang of the script) instead of

    perl -e 'use CGI ; print $INC{"CGI.pm"}."\n" ; '

    I get the same include path as the script.

    I have another copy of perl in /opt/local/bin (the first entry in my PATH). Not sure why, unless Darwin Ports put it in there when I installed it (Mac OS X system)

    Installed CGI using:
    /usr/bin/perl Makefile.PL
    Now it finds it. Of course I see now that the output when running the install commands told me where it was installed all along. So clear now in hindsight.

    My thanks to all the patient and helpful monks - so much about computing I don't know. Thanks for the links.