Hey all. I'm starting out with CGI::Application, and I've got a littl
script that runs fine on one server, but on another server, it gives me
this error message.
[Sun Oct 28 17:29:23 2001] cc.cgi: Can't use string ("start") as a
subroutine ref while "strict refs" in use at
/usr/local/lib/perl5/site_perl/5.6.0/CGI/Application.pm line 90.
cc.cgi looks like this:
#!/usr/bin/perl
BEGIN{ unshift (@INC, "/usr/home/joelman/cc/scripts") }
use cc;
my $cc = cc->new();
$cc->run();
and cc.pm looks like this:
# cc.pm
package cc;
use base 'CGI::Application';
use DBI;
sub setup {
my $self = shift;
$self->tmpl_path('/usr/home/joelman/cc/tmpl/');
$self->start_mode('start');
$self->mode_param('action');
$self->run_modes(
'start' => 'start',
'login' => 'print_login',
'authenticate' => 'authenticate',
'setcookie' => 'set_cookie',
'authorizing' => 'authorizing',
'unauthorized' => 'unauthorized'
);
}
sub cgiapp_init {
my $self = shift;
# Optional Pre-setup initalization behaviors
}
sub start {
return "cc OK.";
}
...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]