{"id":6642,"date":"2022-12-20T19:19:32","date_gmt":"2022-12-20T22:19:32","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/moosexclassattributetraitrole-man3\/"},"modified":"2022-12-20T19:19:32","modified_gmt":"2022-12-20T22:19:32","slug":"moosexclassattributetraitrole-man3","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/moosexclassattributetraitrole-man3\/","title":{"rendered":"MooseX::ClassAttribute::Trait::Role (man3)"},"content":{"rendered":"<h1 align=\"center\">MooseX::ClassAttribute::Trait::Role<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#VERSION\">VERSION<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#METHODS\">METHODS<\/a><br \/> <a href=\"#BUGS\">BUGS<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a><br \/> <a href=\"#COPYRIGHT AND LICENCE\">COPYRIGHT AND LICENCE<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">MooseX::ClassAttribute::Trait::Role \u2212 A trait for roles with class attributes<\/p>\n<h2>VERSION <a name=\"VERSION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">version 0.29<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">for my $attr ( HasClassAttributes\u2212>meta()\u2212>get_all_class_attributes() ) <br \/> { <br \/> print $attr\u2212>name(); <br \/> }<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This role adds awareness of class attributes to a role metaclass object. It provides a set of introspection methods that largely parallel the existing attribute methods, except they operate on class attributes.<\/p>\n<h2>METHODS <a name=\"METHODS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Every method provided by this role has an analogous method in &#8220;Class::MOP::Class&#8221; or &#8220;Moose::Meta::Class&#8221; for regular attributes.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>$meta\u2212>has_class_attribute($name) <br \/> $meta\u2212>get_class_attribute($name) <br \/> $meta\u2212>get_class_attribute_list()<\/b> <br \/> These methods are exactly like their counterparts in MooseX::ClassAttribute::Trait::Class.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>$meta\u2212>add_class_attribute(&#8230;)<\/b> <br \/> This accepts the same options as the Moose::Meta::Attribute &#8220;add_attribute()&#8221; method. However, if an attribute is specified as &#8220;required&#8221; an error will be thrown.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>$meta\u2212>remove_class_attribute($name)<\/b> <br \/> If the named class attribute exists, it is removed from the role.<\/p>\n<h2>BUGS <a name=\"BUGS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">See MooseX::ClassAttribute for details.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Bugs may be submitted through the <small>RT<\/small> bug tracker <http:\/\/rt.cpan.org\/Public\/Dist\/Display.html?Name=MooseX-ClassAttribute> (or bug\u2212moosex\u2212classattribute@rt.cpan.org <mailto:bug-moosex-classattribute@rt.cpan.org>).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">I am also usually active on <small>IRC<\/small> as \u2019drolsky\u2019 on &#8220;irc:\/\/irc.perl.org&#8221;.<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Dave Rolsky <autarch@urth.org><\/p>\n<h2>COPYRIGHT AND LICENCE <a name=\"COPYRIGHT AND LICENCE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This software is Copyright (c) 2016 by Dave Rolsky.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This is free software, licensed under:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The Artistic License 2.0 (GPL Compatible)<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  MooseX::ClassAttribute::Trait::Role \u2212 A trait for roles with class attributes <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3007,3022],"class_list":["post-6642","post","type-post","status-publish","format-standard","hentry","category-sin-categoria","tag-man3","tag-moosexclassattributetraitrole"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6642","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=6642"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6642\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}