1MooseX::ClassAttribute:U:sTerraiCto:n:tRroilbeu(t3e)d PeMrolosDeoXc:u:mCelnatsastAitotnribute::Trait::Role(3)
2
3
4
6 MooseX::ClassAttribute::Trait::Role - A trait for roles with class
7 attributes
8
10 version 0.29
11
13 for my $attr ( HasClassAttributes->meta()->get_all_class_attributes() )
14 {
15 print $attr->name();
16 }
17
19 This role adds awareness of class attributes to a role metaclass
20 object. It provides a set of introspection methods that largely
21 parallel the existing attribute methods, except they operate on class
22 attributes.
23
25 Every method provided by this role has an analogous method in
26 "Class::MOP::Class" or "Moose::Meta::Class" for regular attributes.
27
28 $meta->has_class_attribute($name)
29 $meta->get_class_attribute($name)
30 $meta->get_class_attribute_list()
31 These methods are exactly like their counterparts in
32 MooseX::ClassAttribute::Trait::Class.
33
34 $meta->add_class_attribute(...)
35 This accepts the same options as the Moose::Meta::Attribute
36 "add_attribute()" method. However, if an attribute is specified as
37 "required" an error will be thrown.
38
39 $meta->remove_class_attribute($name)
40 If the named class attribute exists, it is removed from the role.
41
43 See MooseX::ClassAttribute for details.
44
45 Bugs may be submitted through the RT bug tracker
46 <http://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-
47 ClassAttribute> (or bug-moosex-classattribute@rt.cpan.org <mailto:bug-
48 moosex-classattribute@rt.cpan.org>).
49
50 I am also usually active on IRC as 'drolsky' on "irc://irc.perl.org".
51
53 Dave Rolsky <autarch@urth.org>
54
56 This software is Copyright (c) 2016 by Dave Rolsky.
57
58 This is free software, licensed under:
59
60 The Artistic License 2.0 (GPL Compatible)
61
62
63
64perl v5.32.0 2020-07M-o2o8seX::ClassAttribute::Trait::Role(3)