Skip to content

Commit d032fc4

Browse files
committed
Add some docs
1 parent 61e5745 commit d032fc4

File tree

1 file changed

+95
-6
lines changed

1 file changed

+95
-6
lines changed

lib/MooseX/Types/Meta.pm

Lines changed: 95 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,119 @@ use namespace::clean;
2828
# TODO: ParameterizedType{Constraint,Coercion} ?
2929
# {Duck,Class,Enum,Parameterizable,Parameterized,Role,Union}TypeConstraint?
3030

31-
class_type TypeConstraint, { class => 'Moose::Meta::TypeConstraint' };
32-
class_type TypeCoercion, { class => 'Moose::Meta::TypeCoercion' };
33-
class_type Attribute, { class => 'Class::MOP::Attribute' };
31+
=type TypeConstraint
32+
33+
A L<Moose::Meta::TypeConstraint>.
34+
35+
=cut
36+
37+
class_type TypeConstraint, { class => 'Moose::Meta::TypeConstraint' };
38+
39+
=type TypeCoercion
40+
41+
A L<Moose::Meta::TypeCoercion>.
42+
43+
=cut
44+
45+
class_type TypeCoercion, { class => 'Moose::Meta::TypeCoercion' };
46+
47+
=type Attribute
48+
49+
A L<Class::MOP::Attribute>.
50+
51+
=cut
52+
53+
class_type Attribute, { class => 'Class::MOP::Attribute' };
54+
55+
=type RoleAttribute
56+
57+
A L<Moose::Meta::Role::Attribute>.
58+
59+
=cut
60+
3461
class_type RoleAttribute, { class => 'Moose::Meta::Role::Attribute' };
35-
class_type Method, { class => 'Class::MOP::Method' };
36-
class_type Class, { class => 'Class::MOP::Class' };
37-
class_type Role, { class => 'Moose::Meta::Role' };
62+
63+
=type Method
64+
65+
A L<Class::MOP::Method>.
66+
67+
=cut
68+
69+
class_type Method, { class => 'Class::MOP::Method' };
70+
71+
=type Class
72+
73+
A L<Class::MOP::Class>.
74+
75+
=cut
76+
77+
class_type Class, { class => 'Class::MOP::Class' };
78+
79+
=type Role
80+
81+
A L<Moose::Meta::Role>.
82+
83+
=cut
84+
85+
class_type Role, { class => 'Moose::Meta::Role' };
86+
87+
=type StructuredTypeConstraint
88+
89+
A L<MooseX::Meta::TypeConstraint::Structured>.
90+
91+
=cut
3892

3993
class_type StructuredTypeConstraint, {
4094
class => 'MooseX::Meta::TypeConstraint::Structured',
4195
};
4296

97+
=type StructuredTypeCoercion
98+
99+
A L<MooseX::Meta::TypeCoercion::Structured>.
100+
101+
=cut
102+
43103
class_type StructuredTypeCoercion, {
44104
class => 'MooseX::Meta::TypeCoercion::Structured',
45105
};
46106

107+
=type ParameterizableRole
108+
109+
A L<MooseX::Role::Parameterized::Meta::Role::Parameterizable>.
110+
111+
=cut
112+
47113
class_type ParameterizableRole, {
48114
class => 'MooseX::Role::Parameterized::Meta::Role::Parameterizable',
49115
};
50116

117+
=type ParameterizedRole
118+
119+
A L<MooseX::Role::Parameterized::Meta::Role::Parameterized>.
120+
121+
=cut
122+
51123
class_type ParameterizedRole, {
52124
class => 'MooseX::Role::Parameterized::Meta::Role::Parameterized',
53125
};
54126

127+
=type TypeEquals[`x]
128+
129+
A L<Moose::Meta::TypeConstraint>, that's equal to the type constraint
130+
C<x>.
131+
132+
=type TypeOf[`x]
133+
134+
A L<Moose::Meta::TypeConstraint>, that's either equal to or a subtype
135+
of the type constraint C<x>.
136+
137+
=type SubtypeOf[`x]
138+
139+
A L<Moose::Meta::TypeConstraint>, that's a subtype of the type
140+
constraint C<x>.
141+
142+
=cut
143+
55144
for my $t (
56145
[ 'TypeEquals', 'equals' ],
57146
[ 'TypeOf', 'is_a_type_of' ],

0 commit comments

Comments
 (0)