in reply to Re: Re: Re: DBI handle destroyed during CGI::Application setup
in thread DBI handle destroyed during CGI::Application setup

Perl still isn't happy with your hash in the call to set up run_modes in this statement:
$self->run_modes ({ 'logon' => 'LogonPage', 'vlogon' => 'VerifyLogon', 'menu' => 'MenuPage', 'todo' => 'ToDoPage' }); # your run_modes argument was not explicitly a hash - the br +aces correct this
I still get
Can't use string ("LogonPage") as a subroutine ref while "strict refs" + in use at /usr/local/lib/perl5/site_perl/5.6.0/CGI/Application.pm li +ne 90.
Changing back to
$self->run_modes ( 'logon' => \&LogonPage, 'vlogon' => \&VerifyLogon, 'menu' => \&MenuPage, 'todo' => \&ToDoPage ); # your run_modes argument was not explicitly a hash - the bra +ces correct this
makes Perl happy .. no errors, and the first page comes up fine.

--t. alex

"Excellent. Release the hounds." -- Monty Burns.

Replies are listed 'Best First'.
Re: DBI handle destroyed during CGI::Application setup
by Anonymous Monk on Jan 08, 2002 at 05:27 UTC
    You have to upgrade. Prior to version 1.3, CGI::Application only allowed subrefs (\&my_mode) -- not name-based references ('my_mode').

    Name-based referenced were added to improve CGI::Application's sub-classing functionality. Modern versions allow both sub-refs and name-based refs.

    The best answers to questions related to CGI::Application can be found on the official mailing list. To subscribe, send email to:

       cgiapp-subscribe@lists.vm.com

    An archive of the list can be found at:

       http://www.mail-archive.com/cgiapp%40lists.vm.com/