[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] "catch-all" in CGI::Application::Dispatch


Hi...

I 've just used for the first time the CGI::Application::Dispatch module (ver. 2.0) for a CAP I'm writting. One thought. Wouldn't be nice to be able to provide a "catch-all" dispatching runmode while using the dispatch table in case no other entry of the table match?

Like having one more name value pair passed to the dispatch() method like:
   no_match => { '/myapp/notfound/'},
which will be used if nothing else matches.

This will make it possible to provide custom alternatives to the 'Not found 4xx' page generated by the CGI::Application::Dispatch itself.
Right now (correct me if I'm wrong) you can put rules like:
   ':foo?/'    =>        => {app => 'Myapp', rm =>'notfound'},
   ':foo?/:bar?'    =>        => {app => 'Myapp', rm =>'notfound'},
in the table, but one can not do that for all slashes that might be present in the URL.


Regards,
Giannis



---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.