Data-Schema

Data::Schema lets you validate nested data structures with a nested
structure as a schema.

Some examples:

 "int"

The above schema requires that data is an integer.

 [int => {min=>0, max=>100}]

The above schema requires that data is an integer between 0 and 100.

 {
   def => {
     even => [int => {divisible_by=>2}],
     odd  => [int => {mod=>[2, 1]}],
     my_array => [any => {of=>[qw/even odd/]}],
   },
   type => "my_array"
 }

The above schema requires that data is an array of just even numbers
OR just odd numbers.

As you can see, the schema can be very simple or complex depending on
your requirements.


INSTALLATION

To install this module, run the following commands:

	perl Makefile.PL
	make
	make test
	make install

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the
perldoc command.

    perldoc Data::Schema

You can also look for information at:

    RT, CPAN's request tracker
        http://rt.cpan.org/NoAuth/Bugs.html?Dist=Data-Schema

    AnnoCPAN, Annotated CPAN documentation
        http://annocpan.org/dist/Data-Schema

    CPAN Ratings
        http://cpanratings.perl.org/d/Data-Schema

    Search CPAN
        http://search.cpan.org/dist/Data-Schema/


COPYRIGHT AND LICENCE

Copyright (C) 2009 Steven Haryanto

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

