geektron has asked for the wisdom of the Perl Monks concerning the following question:
I found a strange behaviour in a CGI::Application-based app. I use cgiapp_prerun to call my storage methods from the previous page. If a new whatever gets stored (rather than performing an update on the "whatever") I need that ID ( a mysql_insertid on the next page of the application.
I've tried setting the new ID in the CGI object (via $self->query->param( -name = 'whatever', -value => 123);, but between the sub-object call and the run_mode call, the parameter isn't set.
I've tried setting the same "whatever" as a CGI::App param (using $self->param( 'whatever', 123 );) to no avail also.
I'd think that CGI::App uses a singleton appoach for the CGI (and HTML::Template) would be used, and when I've examined the code previously my opinion is supported. I've looked at the stringified reference string for the CGI object, and it looks the same.
Why wouldn't I be getting the "whatever" parameter in the runmode?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: CGI::Application, the cgiapp_prerun mode, and CGI object interaction
by cees (Curate) on Oct 17, 2005 at 01:12 UTC | |
by geektron (Curate) on Oct 17, 2005 at 01:20 UTC | |
by cees (Curate) on Oct 17, 2005 at 01:58 UTC | |
by geektron (Curate) on Oct 17, 2005 at 05:39 UTC | |
Re: CGI::Application, the cgiapp_prerun mode, and CGI object interaction
by johnnywang (Priest) on Oct 16, 2005 at 23:28 UTC | |
by geektron (Curate) on Oct 16, 2005 at 23:39 UTC | |
by Anonymous Monk on Oct 17, 2005 at 00:10 UTC |
Back to
Seekers of Perl Wisdom