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