NAME
Params::Get - Get the parameters to a subroutine in any way you want
VERSION
Version 0.02
SYNOPSIS
use
Params::Get;
sub
where_am_i
{
my
$params
= Params::Validate::Strict::validate_strict({
args
=> Params::Get::get_params(
undef
,
@_
),
schema
=> {
'latitude'
=> {
type
=>
'number'
,
min
=> -180,
max
=> 180
},
'longitude'
=> {
type
=>
'number'
,
min
=> -180,
max
=> 180
}
}
});
'You are at '
,
$params
->{
'latitude'
},
', '
,
$params
->{
'longitude'
},
"\n"
;
}
where_am_i(
latitude
=> 0.3,
longitude
=> 124);
where_am_i({
latitude
=> 3.14,
longitude
=> -155 });
METHODS
get_params
Parse the arguments given to a function. Processes arguments passed to methods and ensures they are in a usable format, allowing the caller to call the function in any way that they want e.g. `foo('bar')`, `foo(arg => 'bar')`, `foo({ arg => 'bar' })` all mean the same when called get_params('arg', @_);
AUTHOR
Nigel Horne, <njh at nigelhorne.com>
BUGS
SEE ALSO
SUPPORT
This module is provided as-is without any warranty.
Please report any bugs or feature requests to bug-params-get at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Params-Get. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Params::Get
You can also look for information at:
MetaCPAN
RT: CPAN's request tracker
CPAN Testers' Matrix
CPAN Testers Dependencies
LICENSE AND COPYRIGHT
Copyright 2025 Nigel Horne.
This program is released under the following licence: GPL2