in reply to script fails loading module version, but > version is installed

Anyone know why I would get an error like this?

You're not using the same perl

or you installed CGI 3.55 in a location perl doesn't know about

or you installed CGI 3.55 in a directory perl (when running under the user account of your webserver) cannot access

or something else like that

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

Replies are listed 'Best First'.
Re^2: script fails loading module version, but > version is installed
by Allasso (Monk) on Jun 30, 2011 at 04:58 UTC
    You're not using the same perl

    I put this at the top of the script being run:
    print "PERL VERSION : "; print `perl -v`; print "\n"; __END__
    it prints this:
    PERL VERSION : This is perl, v5.8.8 built for darwin-2level blah blah...
    - same as the version I am running with -e on the command line...

    I don't know what other perl I could be running.

      Output %INC resp. $INC{"CGI.pm"} in the good and the bad case to see which file gets loaded from where.

        yes, thanks. Two different places.

        so why is the script pointing to a different location than perl -e?

        And how do I change that?

      I don't know what other perl I could be running.

      You're not checking to see which perl you're running

      $ perl -e " die $^X" C:\perl\5.12.2\bin\MSWin32-x86-multi-thread\perl.exe at -e line 1.

      Similarly compare %ENV, INC, %INC

      Some have installed 85+ different perls

Re^2: script fails loading module version, but > version is installed
by Allasso (Monk) on Jun 30, 2011 at 04:40 UTC
    You're not using the same perl

    ?

    or you installed CGI 3.55 in a location perl doesn't know about

    or you installed CGI 3.55 in a directory perl (when running under the user account of your webserver) cannot access

    perl -e 'use CGI; print "CGI: $CGI::VERSION";' CGI: 3.55
    ?