XAS::Service::CheckParameters - A mixin to check parameters.
my $valids; my $params = { start => 1, limit => 25 }; if ($valids = $self->check_parameters($params, 'pager')) { while (my ($key, $value) = each(%$valids)) { printf("key: %s, value: %s\n", $key, $value); } }
This is a mixin routine to help with checking Data::FormValidator parameters. It expects a "profile" method to be defined. Exceptions are thrown, and the message is a JSON data structure of the errors.
A basic validation routine. It returns a hashref of valid parmeters and there values. It accepts these parameters.
A hashref of parameters to check.
The profiles type to check against.
Kevin L. Esteb, <kevin@kesteb.us>
Copyright (c) 2012-2016 Kevin L. Esteb
This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. For details, see the full text of the license at http://www.perlfoundation.org/artistic_license_2_0.
To install XAS::Service, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XAS::Service
CPAN shell
perl -MCPAN -e shell install XAS::Service
For more information on module installation, please visit the detailed CPAN module installation guide.