Declare::Constraints::SimpleDeclare::Constraints::Simple is a Perl module for Declarative Validation of Data Structures. | |
Download |
Declare::Constraints::Simple Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Robert Sedlacek
- Publisher web site:
- http://search.cpan.org/~phaylon/
Declare::Constraints::Simple Tags
Declare::Constraints::Simple Description
Declare::Constraints::Simple is a Perl module for Declarative Validation of Data Structures. Declare::Constraints::Simple is a Perl module for Declarative Validation of Data Structures.SYNOPSIS use Declare::Constraints::Simple-All; my $profile = IsHashRef( -keys => HasLength, -values => IsArrayRef( IsObject )); my $result1 = $profile->(undef); print $result1->message, "n"; # 'Not a HashRef' my $result2 = $profile->({foo => }); print $result2->message, "n"; # 'Not an Object' print $result2->path, "n"; # 'IsHashRef.IsArrayRef.IsObject'The main purpose of this module is to provide an easy way to build a profile to validate a data structure. It does this by giving you a set of declarative keywords in the importing namespace. Requirements: · Perl
Declare::Constraints::Simple Related Software