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

Ah, mea culpa. The correct name is import_names.

Replies are listed 'Best First'.
Re^5: CGI Parameters
by moritz (Cardinal) on May 19, 2009 at 18:19 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.