NAME
Hash::Param - CGI/Catalyst::Request-like parameter-hash accessor/mutator
VERSION
Version 0.01
SYNPOSIS
my $params = Hash::Param->new(parameters => {
qw/a 1 b 2 c 3/,
d => [qw/4 5 6 7/],
})
$result = $params->param( a ) # Returns 1
$result = $params->param( d ) # Returns 4
@result = $params->param( d ) # Returns 4, 5, 6, 7
@result = $params->params # Returns a, b, c, d
$result = $params->params # Returns { a => , b => 2,
c => 3, d => [ 4, 5, 6, 7 ] }
@result = $params->params( a, b, d ) # Returns 1, 2, [ 4, 5, 6, 7 ]
%result = $params->slice( a, b ) # Returns a => 1, b => 2
$params->param( a => 8 ) # Sets a to 8
$params->param( a => 8, 9 ) # Sets a to [ 8, 9 ]
DESCRIPTION
Hash::Param provides a CGI-param-like accessor/mutator for a hash
METHODS
$params->params( <hash> )
$params->params( <param>, <param>, ... )
$params->params
$params->parameters
An alias for ->params
$params->param( <param> )
$params->param( <param> => <value> )
$params->param( <param> => <value>, <value>, ... )
$params->param
$params->parameters
An alias for ->param
$params->get( <param> )
$params->get( <param>, <param>, ... )
$params->get
$params->slice( <param>, <param>, ... )
SYNOPSIS
AUTHOR
Robert Krimen, <rkrimen at cpan.org>
SOURCE
You can contribute or fork this project via GitHub:
http://github.com/robertkrimen/hash-param/tree/master
git clone git://github.com/robertkrimen/hash-param.git Hash-Param
BUGS
Please report any bugs or feature requests to bug-hash-param at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Hash-Param. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Hash::Param
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2008 Robert Krimen, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.