NAME
Data::Schema::Type::All - Type handler for 'all' type
SYNOPSIS
use Data::Schema;
DESCRIPTION
'All' is not really an actual data type, but a way to validate whether a value validates to all of the specified schemas. 'And' is another name for this type.
Example schema (in YAML syntax):
- all
- schemas:
- [int, {divisible_by: 2}]
- [int, {divisible_by: 7}]
Example valid data:
42 # divisible by 2 as well as 7
Example invalid data:
21 # divisible by 7 but not by 2
4 # divisible by 2 but not by 7
15 # not divisible by 2 nor 7
TYPE ATTRIBUTES
of => [schema1, schema2, ...]
Specify the schema(s), where the value will need to be valid to all of them.
AUTHOR
Steven Haryanto, <steven at masterweb.net>
COPYRIGHT & LICENSE
Copyright 2009 Steven Haryanto, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.