[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] Undefined subroutine using a CGI Script on a Raq3



Michael wrote:

> Hello guys!
>
> Hopefully you can help me out with this problem...
>
> I'm trying to transfer a cgi-script from my old unix server to my new Cobalt
> Raq3 and there is one part of the script that is not working.  When I try to
> run the cgi-script, I get the error message:
>
> "Undefined subroutine &main::main called at acc_auth.pl line 150."
>
> This refers to the following lines of code:
>
> ## NOTHING ENTERED SEND TO LOGIN PAGE ##
> unless ($something_in) { &main::main; }
>
> I am a farley experienced person when it comes to installing CGI scripts so
> I know that the error has nothing to do with common errors such as location
> of perl, upload in ascii mode, chmod 755, etc...  So could someone please
> explain to me what might be causing this error message.  The script works
> fine on a unix server...
>
> Any ideas as to what this means?

You most likely are not using the same version of Perl on both machines. If you
do, then you might not have the same modules installed. I believe that for
main::main to work, you need to have subs or related modules from CPAN
installed.

Personally, I upgraded Perl on my Raq2 (it was really old: 5.004) to the latest
stable: 5.60.
That allows me to use all the scripts that work on other boxes.