Commit | Line | Data |
f785aad8 |
1 | package Moose::Meta::Mixin::AttributeCore; |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
f785aad8 |
6 | use base 'Class::MOP::Mixin::AttributeCore'; |
7 | |
dc2b7cc8 |
8 | __PACKAGE__->meta->add_attribute( |
9 | 'isa' => ( |
10 | reader => '_isa_metadata', |
11 | Class::MOP::_definition_context(), |
12 | ) |
13 | ); |
14 | |
15 | __PACKAGE__->meta->add_attribute( |
16 | 'does' => ( |
17 | reader => '_does_metadata', |
18 | Class::MOP::_definition_context(), |
19 | ) |
20 | ); |
21 | |
22 | __PACKAGE__->meta->add_attribute( |
23 | 'is' => ( |
24 | reader => '_is_metadata', |
25 | Class::MOP::_definition_context(), |
26 | ) |
27 | ); |
28 | |
29 | __PACKAGE__->meta->add_attribute( |
30 | 'required' => ( |
31 | reader => 'is_required', |
32 | Class::MOP::_definition_context(), |
33 | ) |
34 | ); |
35 | |
36 | __PACKAGE__->meta->add_attribute( |
37 | 'lazy' => ( |
38 | reader => 'is_lazy', Class::MOP::_definition_context(), |
39 | ) |
40 | ); |
41 | |
42 | __PACKAGE__->meta->add_attribute( |
43 | 'lazy_build' => ( |
44 | reader => 'is_lazy_build', |
45 | Class::MOP::_definition_context(), |
46 | ) |
47 | ); |
48 | |
49 | __PACKAGE__->meta->add_attribute( |
50 | 'coerce' => ( |
51 | reader => 'should_coerce', |
52 | Class::MOP::_definition_context(), |
53 | ) |
54 | ); |
f785aad8 |
55 | |
f785aad8 |
56 | __PACKAGE__->meta->add_attribute( |
dc2b7cc8 |
57 | 'weak_ref' => ( |
58 | reader => 'is_weak_ref', |
59 | Class::MOP::_definition_context(), |
60 | ) |
61 | ); |
62 | |
f785aad8 |
63 | __PACKAGE__->meta->add_attribute( |
dc2b7cc8 |
64 | 'auto_deref' => ( |
65 | reader => 'should_auto_deref', |
66 | Class::MOP::_definition_context(), |
67 | ) |
68 | ); |
69 | |
f785aad8 |
70 | __PACKAGE__->meta->add_attribute( |
71 | 'type_constraint' => ( |
72 | reader => 'type_constraint', |
73 | predicate => 'has_type_constraint', |
dc2b7cc8 |
74 | Class::MOP::_definition_context(), |
f785aad8 |
75 | ) |
76 | ); |
dc2b7cc8 |
77 | |
f785aad8 |
78 | __PACKAGE__->meta->add_attribute( |
79 | 'trigger' => ( |
80 | reader => 'trigger', |
81 | predicate => 'has_trigger', |
dc2b7cc8 |
82 | Class::MOP::_definition_context(), |
f785aad8 |
83 | ) |
84 | ); |
dc2b7cc8 |
85 | |
f785aad8 |
86 | __PACKAGE__->meta->add_attribute( |
87 | 'handles' => ( |
88 | reader => 'handles', |
89 | writer => '_set_handles', |
90 | predicate => 'has_handles', |
dc2b7cc8 |
91 | Class::MOP::_definition_context(), |
f785aad8 |
92 | ) |
93 | ); |
dc2b7cc8 |
94 | |
f785aad8 |
95 | __PACKAGE__->meta->add_attribute( |
96 | 'documentation' => ( |
97 | reader => 'documentation', |
98 | predicate => 'has_documentation', |
dc2b7cc8 |
99 | Class::MOP::_definition_context(), |
f785aad8 |
100 | ) |
101 | ); |
102 | |
103 | 1; |
104 | |
ad46f524 |
105 | # ABSTRACT: Core attributes shared by attribute metaclasses |
106 | |
f785aad8 |
107 | __END__ |
108 | |
109 | =pod |
110 | |
f785aad8 |
111 | =head1 DESCRIPTION |
112 | |
113 | This class implements the core attributes (aka properties) shared by all Moose |
114 | attributes. See the L<Moose::Meta::Attribute> documentation for API details. |
115 | |
c5fc2c21 |
116 | =head1 BUGS |
117 | |
118 | See L<Moose/BUGS> for details on reporting bugs. |
119 | |
f785aad8 |
120 | =cut |