CGI::Application::Plugin::QueryHash - Get back query params as hash


NAME

CGI::Application::Plugin::QueryHash - Get back query params as hash(ref)


SYNOPSIS

  use CGI::Application::Plugin::QueryHash;
  # get query params as hash
  %params = $self->query_hash();
  # get query params as hash-ref
  $params = $self->query_hash();
  # get only certain parameters
  %params = $self->query_hash( @known_parameters );


DESCRIPTION

CGI::Application::Plugin::QueryHash helps make it easier to get access to the CGI query parameters as a hash, as opposed to having to query each parameter directly.


METHODS

query_hash(@params)

Returns to the caller the CGI query parameters as a hash/hash-ref, depending on whether called in a list or scalar context. Repeating form parameters are handled by turning them into list-refs inside the results.

If a list of @params is provided, we only return the values for those query parameters. By default, all of the CGI query parameters are returned.


AUTHOR

Graham TerMarsch <cpan@howlingfrog.com>


COPYRIGHT

Copyright (C) 2006, Graham TerMarsch. All rights reserved.

This is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


SEE ALSO

the CGI::Application manpage.