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?