Search code examples
perlcgiapp

Can I have regular parameters along with CGI::Application::Dispatch?


I appreciate the ability to be able to do: http://server/controller/runmode or even http://server/controller/runmode/id. But if I have a lot of optional parameters I'd like to be able to do the regular: http://server/controller/runmode?foo=bar&baz=frew, especially since I have a lot of JS that will do the latter for me. Does anyone know of a way to allow for this functionality?

Thanks!

Edit: Ok, I figured it out with help from mpeters. To get params generated by CAD you obviously just do $self->param('foo'), but if you want regular params you do $self->query()->param('bar')


Solution

  • Edit: Ok, I figured it out with help from mpeters. To get params generated by CAD you obviously just do $self->param('foo'), but if you want regular params you do $self->query()->param('bar')