Commit | Line | Data |
4e036ee4 |
1 | |
2 | package Moose::Meta::TypeConstraint; |
3 | |
4 | use strict; |
5 | use warnings; |
6 | use metaclass; |
7 | |
8 | Moose::Meta::TypeConstraint->meta->add_attribute( |
9 | Class::MOP::Attribute->new('name' => ( |
10 | reader => 'name' |
11 | )) |
12 | ); |
13 | |
14 | Moose::Meta::TypeConstraint->meta->add_attribute( |
15 | Class::MOP::Attribute->new('constraint_code' => ( |
16 | reader => 'constraint_code' |
17 | )) |
18 | ); |
19 | |
20 | Moose::Meta::TypeConstraint->meta->add_attribute( |
21 | Class::MOP::Attribute->new('coercion_code' => ( |
22 | reader => 'coercion_code', |
23 | writer => 'set_coercion_code', |
24 | predicate => 'has_coercion' |
25 | )) |
26 | ); |
27 | |
7415b2cb |
28 | sub new { return (shift)->meta->new_object(@_) } |
4e036ee4 |
29 | |
30 | 1; |
31 | |
32 | __END__ |
33 | |
34 | =pod |
35 | |
36 | =head1 NAME |
37 | |
38 | Moose::Meta::TypeConstraint - The Moose Type Constraint metaobject |
39 | |
40 | =head1 SYNOPSIS |
41 | |
42 | =head1 DESCRIPTION |
43 | |
44 | =head1 METHODS |
45 | |
46 | =over 4 |
47 | |
48 | =item B<meta> |
49 | |
50 | =item B<new> |
51 | |
52 | =item B<name> |
53 | |
54 | =item B<check> |
55 | |
56 | =item B<coerce> |
57 | |
58 | =item B<coercion_code> |
59 | |
60 | =item B<set_coercion_code> |
61 | |
62 | =item B<constraint_code> |
63 | |
64 | =item B<has_coercion> |
65 | |
66 | =back |
67 | |
68 | =head1 BUGS |
69 | |
70 | All complex software has bugs lurking in it, and this module is no |
71 | exception. If you find a bug please either email me, or add the bug |
72 | to cpan-RT. |
73 | |
74 | =head1 AUTHOR |
75 | |
76 | Stevan Little E<lt>stevan@iinteractive.comE<gt> |
77 | |
78 | =head1 COPYRIGHT AND LICENSE |
79 | |
80 | Copyright 2006 by Infinity Interactive, Inc. |
81 | |
82 | L<http://www.iinteractive.com> |
83 | |
84 | This library is free software; you can redistribute it and/or modify |
85 | it under the same terms as Perl itself. |
86 | |
87 | =cut |