Skip Menu |

This queue is for tickets about the CGI-Application-Dispatch CPAN distribution.

Report information
The Basics
Id: 66558
Status: resolved
Priority: 0/
Queue: CGI-Application-Dispatch

People
Owner: MARKSTOS [...] cpan.org
Requestors: RSAVAGE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.18
Fixed in: (no value)



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.
Thanks for the report. I'm about to release 3.08, which addresses this. When using auto_rest, the start_mode() should be correctly defaulted to if no run mode is available. Mark