add applied_attribute metarole
[gitmo/MooseX-SemiAffordanceAccessor.git] / lib / MooseX / SemiAffordanceAccessor.pm
CommitLineData
b95d9f9b 1package MooseX::SemiAffordanceAccessor;
2
3use strict;
4use warnings;
5
7891bc29 6use Moose 0.94 ();
b95d9f9b 7use Moose::Exporter;
8use Moose::Util::MetaRole;
9use MooseX::SemiAffordanceAccessor::Role::Attribute;
10
5177f5e0 11Moose::Exporter->setup_import_methods(
12 class_metaroles => {
13 attribute => ['MooseX::SemiAffordanceAccessor::Role::Attribute'],
14 },
080d1e6d 15 role_metaroles => {
16 applied_attribute => ['MooseX::SemiAffordanceAccessor::Role::Attribute'],
17 },
5177f5e0 18);
b95d9f9b 19
b95d9f9b 201;
21
5177f5e0 22# ABSTRACT: Name your accessors foo() and set_foo()
23
b95d9f9b 24__END__
25
26=pod
27
b95d9f9b 28=head1 SYNOPSIS
29
b95d9f9b 30 use Moose;
8d547f46 31 use MooseX::SemiAffordanceAccessor;
b95d9f9b 32
33 # make some attributes
34
35=head1 DESCRIPTION
36
37This module does not provide any methods. Simply loading it changes
38the default naming policy for the loading class so that accessors are
39separated into get and set methods. The get methods have the same name
40as the accessor, while set methods are prefixed with "set_".
41
42If you define an attribute with a leading underscore, then the set
43method will start with "_set_".
44
45If you explicitly set a "reader" or "writer" name when creating an
46attribute, then that attribute's naming scheme is left unchanged.
47
48The name "semi-affordance" comes from David Wheeler's Class::Meta
49module.
50
b95d9f9b 51=head1 BUGS
52
53Please report any bugs or feature requests to
54C<bug-moosex-semiaffordanceaccessor@rt.cpan.org>, or through
55the web interface at L<http://rt.cpan.org>. I will be notified, and
56then you'll automatically be notified of progress on your bug as I
57make changes.
58
b95d9f9b 59=cut