Just another Perl shrine | |
PerlMonks |
CGI::Application, the cgiapp_prerun mode, and CGI object interactionby geektron (Curate) |
on Oct 16, 2005 at 22:52 UTC ( [id://500619]=perlquestion: print w/replies, xml ) | Need Help?? |
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?
Back to
Seekers of Perl Wisdom
|
|