| 1 | =head1 NAME | ||
| 2 | |||
| 3 | Declare::Constraints::Simple::Library - Constraint Library Bundle | ||
| 4 | |||
| 5 | =cut | ||
| 6 | |||
| 7 | package Declare::Constraints::Simple::Library; | ||
| 8 | 13 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 13 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 13 | ▶ | use base qw( |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | Declare::Constraints::Simple::Library::General | ||
| 13 | Declare::Constraints::Simple::Library::Scalar | ||
| 14 | Declare::Constraints::Simple::Library::Numerical | ||
| 15 | Declare::Constraints::Simple::Library::OO | ||
| 16 | Declare::Constraints::Simple::Library::Referencial | ||
| 17 | Declare::Constraints::Simple::Library::Hash | ||
| 18 | Declare::Constraints::Simple::Library::Array | ||
| 19 | Declare::Constraints::Simple::Library::Operators | ||
| 20 | 13 | ); | |
| 21 | |||
| 22 | =head1 DESCRIPTION | ||
| 23 | |||
| 24 | This module functions as bundle of all default libraries, and as map | ||
| 25 | and/or reference of said ones. | ||
| 26 | |||
| 27 | =head1 LIBRARIES | ||
| 28 | |||
| 29 | =over | ||
| 30 | |||
| 31 | =item L<Declare::Constraints::Simple::Library::General> | ||
| 32 | |||
| 33 | General constraints and constraint-like elements that affect the whole | ||
| 34 | framework. | ||
| 35 | |||
| 36 | Provides: C<Message>, C<Scope>, C<SetResult>, C<IsValid>, C<ReturnTrue>, | ||
| 37 | C<ReturnFalse> | ||
| 38 | |||
| 39 | =item L<Declare::Constraints::Simple::Library::Scalar> | ||
| 40 | |||
| 41 | Constraints for scalar value validation. | ||
| 42 | |||
| 43 | Provides: C<Matches>, C<IsDefined>, C<HasLength>, C<IsOneOf>, C<IsTrue>, | ||
| 44 | C<IsEq> | ||
| 45 | |||
| 46 | =item L<Declare::Constraints::Simple::Library::Numerical> | ||
| 47 | |||
| 48 | These validate values by their numerical properties. | ||
| 49 | |||
| 50 | Provides: C<IsNumber>, C<IsInt> | ||
| 51 | |||
| 52 | =item L<Declare::Constraints::Simple::Library::OO> | ||
| 53 | |||
| 54 | For validation of values in an object oriented manner. | ||
| 55 | |||
| 56 | Provides: C<IsA>, C<IsClass>, C<IsObject>, C<HasMethods> | ||
| 57 | |||
| 58 | =item L<Declare::Constraints::Simple::Library::Referencial> | ||
| 59 | |||
| 60 | These can validate properties by their reference types. | ||
| 61 | |||
| 62 | Provides: C<IsRefType>, C<IsScalarRef>, C<IsArrayRef>, C<IsHashRef>, | ||
| 63 | C<IsCodeRef>, C<IsRegex> | ||
| 64 | |||
| 65 | =item L<Declare::Constraints::Simple::Library::Array> | ||
| 66 | |||
| 67 | These constraints deal with array references and their contents. | ||
| 68 | |||
| 69 | Provides: C<HasArraySize>, L<OnArrayElements>, L<OnEvenElements>, | ||
| 70 | L<OnOddElements> | ||
| 71 | |||
| 72 | =item L<Declare::Constraints::Simple::Library::Hash> | ||
| 73 | |||
| 74 | All constraints appliable to hash references as well as their keys and | ||
| 75 | values. | ||
| 76 | |||
| 77 | Provides: C<HasAllKeys>, C<OnHashKeys> | ||
| 78 | |||
| 79 | =item L<Declare::Constraints::Simple::Library::Operators> | ||
| 80 | |||
| 81 | Operators can be used in any place a constraint can be used, as | ||
| 82 | their implementations are similar. | ||
| 83 | |||
| 84 | Provides: C<And>, C<Or>, C<XOr>, C<Not>, C<CaseValid> | ||
| 85 | |||
| 86 | =back | ||
| 87 | |||
| 88 | =head1 SEE ALSO | ||
| 89 | |||
| 90 | L<Declare::Constraints::Simple> | ||
| 91 | |||
| 92 | =head1 AUTHOR | ||
| 93 | |||
| 94 | Robert 'phaylon' Sedlacek C<E<lt>phaylon@dunkelheit.atE<gt>> | ||
| 95 | |||
| 96 | =head1 LICENSE AND COPYRIGHT | ||
| 97 | |||
| 98 | This module is free software, you can redistribute it and/or modify it | ||
| 99 | under the same terms as perl itself. | ||
| 100 | |||
| 101 | =cut | ||
| 102 | |||
| 103 | 13 | 1; | |
| 104 | |||