Subject: | Module uses undefined run mode |
Hi Mark
As James has recently reported on the CGI::Application mailing list,
there is a case where CGI::Application::Dispatch uses the $rm variable,
but it is not defined.
I suggest testing for this case, by adding this line:
$rm or throw_error("Run mode not defined");
just before $rm is used at line 400:
$rm .= "_$http_method";
The alternative is for the code to try to determine the app's value for
the starting run mode, and set $rm to that.
The trouble with that is it covers up a (potential) bug in the user's
code.