Catmandu::Validator::Mock - Validate items based on a flag
use Catmandu::Validator::Mock; my $validator = Catmandu::Validator::Mock->new( message => 'item is invalid', reject => 1, );
This Catmandu::Validator can be used for testing as it does not actually look at the data to validate. Instead it rejects items if reject is set to a true value.
reject
Error message to return for rejected items.
The validator marks all items as invalid as long as this flag is true. Default is false.
See Catmandu::Validator for inherited methods, common configuration options, and usage.
To install Catmandu, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu
CPAN shell
perl -MCPAN -e shell install Catmandu
For more information on module installation, please visit the detailed CPAN module installation guide.