Data::Validator::Role::Ordered - Provide results as a list in the order specified.
use Data::Validator; sub test { state $arguments = Data::Validator->new( foo => "Str", bar => "Num", )->with(qw( Method Sequenced Ordered )); my ($self, $foo, $bar) = $arguments->validate(@_); }
The Ordered Role adds to Data::Validator the ability for the `validate` method to return an ordered list, with values matching the specification provided by Data::Validator.
Return a list, in order, of arguments rather than the result.
Although it should be of nominal impact to performance, due to the constraints of Data::Validator this first maps all provided parameters to a hash, validates them as a hash, and then maps the has back to a list. A more efficient method would clearly to be use just a list from top to bottom.
If you find any, feel free to submit them.
https://github.com/ssmccoy/Data-Validator-Role-Ordered
Copyright © 2012, Say Media INC. Released under the Artistic License, 2.0
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '©'. Assuming UTF-8
To install Data::Validator::Role::Ordered, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Validator::Role::Ordered
CPAN shell
perl -MCPAN -e shell install Data::Validator::Role::Ordered
For more information on module installation, please visit the detailed CPAN module installation guide.