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 | |
8 | __PACKAGE__->meta->add_attribute( 'isa' => ( reader => '_isa_metadata' ) ); |
9 | __PACKAGE__->meta->add_attribute( 'does' => ( reader => '_does_metadata' ) ); |
10 | __PACKAGE__->meta->add_attribute( 'is' => ( reader => '_is_metadata' ) ); |
11 | |
12 | __PACKAGE__->meta->add_attribute( 'required' => ( reader => 'is_required' ) ); |
13 | __PACKAGE__->meta->add_attribute( 'lazy' => ( reader => 'is_lazy' ) ); |
14 | __PACKAGE__->meta->add_attribute( |
15 | 'lazy_build' => ( reader => 'is_lazy_build' ) ); |
16 | __PACKAGE__->meta->add_attribute( 'coerce' => ( reader => 'should_coerce' ) ); |
17 | __PACKAGE__->meta->add_attribute( 'weak_ref' => ( reader => 'is_weak_ref' ) ); |
18 | __PACKAGE__->meta->add_attribute( |
19 | 'auto_deref' => ( reader => 'should_auto_deref' ) ); |
20 | __PACKAGE__->meta->add_attribute( |
21 | 'type_constraint' => ( |
22 | reader => 'type_constraint', |
23 | predicate => 'has_type_constraint', |
24 | ) |
25 | ); |
26 | __PACKAGE__->meta->add_attribute( |
27 | 'trigger' => ( |
28 | reader => 'trigger', |
29 | predicate => 'has_trigger', |
30 | ) |
31 | ); |
32 | __PACKAGE__->meta->add_attribute( |
33 | 'handles' => ( |
34 | reader => 'handles', |
35 | writer => '_set_handles', |
36 | predicate => 'has_handles', |
37 | ) |
38 | ); |
39 | __PACKAGE__->meta->add_attribute( |
40 | 'documentation' => ( |
41 | reader => 'documentation', |
42 | predicate => 'has_documentation', |
43 | ) |
44 | ); |
45 | |
46 | 1; |
47 | |
ad46f524 |
48 | # ABSTRACT: Core attributes shared by attribute metaclasses |
49 | |
f785aad8 |
50 | __END__ |
51 | |
52 | =pod |
53 | |
f785aad8 |
54 | =head1 DESCRIPTION |
55 | |
56 | This class implements the core attributes (aka properties) shared by all Moose |
57 | attributes. See the L<Moose::Meta::Attribute> documentation for API details. |
58 | |
c5fc2c21 |
59 | =head1 BUGS |
60 | |
61 | See L<Moose/BUGS> for details on reporting bugs. |
62 | |
f785aad8 |
63 | =cut |