Commit | Line | Data |
9a491c80 |
1 | package MooseX::Meta::TypeConstraint::Role::Structured; |
2 | |
3 | use Moose::Role; |
9a491c80 |
4 | |
5 | =head1 NAME |
6 | |
7 | MooseX::Meta::TypeConstraint::Role::Structured - Structured Type Constraints |
8 | |
9 | =head1 VERSION |
10 | |
11 | 0.01 |
12 | |
13 | =cut |
14 | |
15 | our $VERSION = '0.01'; |
16 | |
17 | =head1 DESCRIPTION |
18 | |
bc5c0758 |
19 | STUB - TBD |
9a491c80 |
20 | |
21 | =head1 ATTRIBUTES |
22 | |
23 | This class defines the following attributes. |
24 | |
25 | =head2 signature |
26 | |
27 | This is a signature of internal contraints for the contents of the outer |
28 | contraint container. |
29 | |
30 | =cut |
31 | |
32 | has 'signature' => ( |
33 | is=>'ro', |
bc5c0758 |
34 | isa=>'Ref', |
9a491c80 |
35 | required=>1, |
36 | ); |
37 | |
38 | =head1 METHODS |
39 | |
40 | This class defines the following methods. |
41 | |
42 | =head2 _normalize_args |
43 | |
44 | Get arguments into a known state or die trying. Ideally we try to make this |
45 | into a HashRef so we can match it up with the L</signature> HashRef. |
46 | |
47 | =cut |
48 | |
9a491c80 |
49 | |
50 | =head2 constraint |
51 | |
52 | The constraint is basically validating the L</signature> against the incoming |
53 | |
54 | =cut |
55 | |
9a491c80 |
56 | =head2 equals |
57 | |
58 | modifier to make sure equals descends into the L</signature> |
59 | |
60 | =cut |
61 | |
9a491c80 |
62 | =head2 signature_equals |
63 | |
64 | Check that the signature equals another signature. |
65 | |
66 | =cut |
67 | |
9a491c80 |
68 | =head1 AUTHOR |
69 | |
70 | John James Napiorkowski <jjnapiork@cpan.org> |
71 | |
72 | =head1 LICENSE |
73 | |
74 | You may distribute this code under the same terms as Perl itself. |
75 | |
76 | =cut |
77 | |
bc5c0758 |
78 | 1; |