in reply to Re^4: CGI Parameters
in thread CGI Parameters

If you look into the source code, you'll see that import_names calls $self->param internally, so it'll install all those names that param() returns.

I don't know if there's an equivalent that imports all the parameters that url_param returns, grepping through the source code didn't reveal any methods that uses url_param, so I guess your chances are rather slim.

Replies are listed 'Best First'.
Re^6: CGI Parameters
by ikegami (Patriarch) on May 19, 2009 at 18:49 UTC

    If you merge the GET and POST params before calling import_names, parameters of both types will be imported.

    for my $param ($cgi->url_params()) { $cgi->append( -name => $param, -values => [ $cgi->url_param($param) ], ); }

    The unusual is doable. It just takes a bit more work.