1 package MooseX::SemiAffordanceAccessor;
8 use Moose::Util::MetaRole;
9 use MooseX::SemiAffordanceAccessor::Role::Attribute;
13 attribute => ['MooseX::SemiAffordanceAccessor::Role::Attribute'],
16 applied_attribute => ['MooseX::SemiAffordanceAccessor::Role::Attribute'],
20 $metaroles{role_metaroles} = {
21 applied_attribute => ['MooseX::SemiAffordanceAccessor::Role::Attribute'],
22 } if $Moose::VERSION >= 1.9900;
24 Moose::Exporter->setup_import_methods(%metaroles);
28 # ABSTRACT: Name your accessors foo() and set_foo()
37 use MooseX::SemiAffordanceAccessor;
39 # make some attributes
43 This module does not provide any methods. Simply loading it changes
44 the default naming policy for the loading class so that accessors are
45 separated into get and set methods. The get methods have the same name
46 as the accessor, while set methods are prefixed with "set_".
48 If you define an attribute with a leading underscore, then the set
49 method will start with "_set_".
51 If you explicitly set a "reader" or "writer" name when creating an
52 attribute, then that attribute's naming scheme is left unchanged.
54 The name "semi-affordance" comes from David Wheeler's Class::Meta
59 Please report any bugs or feature requests to
60 C<bug-moosex-semiaffordanceaccessor@rt.cpan.org>, or through
61 the web interface at L<http://rt.cpan.org>. I will be notified, and
62 then you'll automatically be notified of progress on your bug as I