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

I appreciate the ability to: http: // server / controller / runmode or even http: // server / controller / runmode / id . But if I have a lot of additional parameters, I would like to do a regular one: 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 how to use this functionality?

Thanks!

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

+3
source share
2 answers

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

0
source

You do not need to do something magical in order to work, it alone works. You just retrieve them differently. If it comes from the CGI query string, you will get it with

$self->query('param_name')

If it comes from PATH_INFO (the part that is processing CGI::Application::Dispatch), you get it

$self->param('param_name')

+3
source

All Articles