NAME

Data::Validator::Role::Ordered - Provide results as a list in the order specified.

SYNOPSIS

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(@_);
}

DESCRIPTION

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.

MODIFIERS

validate

Return a list, in order, of arguments rather than the result.

CONSIDERATIONS

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.

BUGS

If you find any, feel free to submit them.

https://github.com/ssmccoy/Data-Validator-Role-Ordered

LICENSE

Copyright © 2012, Say Media INC. Released under the Artistic License, 2.0

1 POD Error

The following errors were encountered while parsing the POD:

Around line 70:

Non-ASCII character seen before =encoding in '©'. Assuming UTF-8