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

Maybe you could enlighten me as to what import_params is? I don't see it in the docs, so I guess it's not part of the official distribution.

If it's something you wrote, maybe post it here?

Replies are listed 'Best First'.
Re^4: CGI Parameters
by salazar (Scribe) on May 19, 2009 at 18:01 UTC
      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.

        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.