what-a-mess
[gitmo/Moose.git] / lib / Moose / Meta / TypeConstraint.pm
CommitLineData
4e036ee4 1
2package Moose::Meta::TypeConstraint;
3
4use strict;
5use warnings;
6use metaclass;
7
8Moose::Meta::TypeConstraint->meta->add_attribute(
9 Class::MOP::Attribute->new('name' => (
10 reader => 'name'
11 ))
12);
13
14Moose::Meta::TypeConstraint->meta->add_attribute(
15 Class::MOP::Attribute->new('constraint_code' => (
16 reader => 'constraint_code'
17 ))
18);
19
20Moose::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 28sub new { return (shift)->meta->new_object(@_) }
4e036ee4 29
301;
31
32__END__
33
34=pod
35
36=head1 NAME
37
38Moose::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
70All complex software has bugs lurking in it, and this module is no
71exception. If you find a bug please either email me, or add the bug
72to cpan-RT.
73
74=head1 AUTHOR
75
76Stevan Little E<lt>stevan@iinteractive.comE<gt>
77
78=head1 COPYRIGHT AND LICENSE
79
80Copyright 2006 by Infinity Interactive, Inc.
81
82L<http://www.iinteractive.com>
83
84This library is free software; you can redistribute it and/or modify
85it under the same terms as Perl itself.
86
87=cut