Commit | Line | Data |
a623c113 |
1 | package MooseX::FollowPBP; |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | use Moose 0.94 (); |
7 | use Moose::Exporter; |
8 | use Moose::Util::MetaRole; |
9 | use MooseX::FollowPBP::Role::Attribute; |
10 | |
11 | Moose::Exporter->setup_import_methods( |
12 | class_metaroles => { |
13 | attribute => ['MooseX::FollowPBP::Role::Attribute'], |
14 | }, |
097c9390 |
15 | role_metaroles => { |
16 | applied_attribute => ['MooseX::FollowPBP::Role::Attribute'], |
17 | }, |
a623c113 |
18 | ); |
19 | |
20 | 1; |
21 | |
22 | # ABSTRACT: Name your accessors get_foo() and set_foo() |
23 | |
24 | __END__ |
25 | |
26 | =pod |
27 | |
28 | =head1 SYNOPSIS |
29 | |
a623c113 |
30 | use Moose; |
b2d35122 |
31 | use MooseX::FollowPBP; |
a623c113 |
32 | |
33 | # make some attributes |
34 | |
35 | =head1 DESCRIPTION |
36 | |
37 | This module does not provide any methods. Simply loading it changes |
38 | the default naming policy for the loading class so that accessors are |
39 | separated into get and set methods. The get methods are prefixed with |
40 | "get_" as the accessor, while set methods are prefixed with |
41 | "set_". This is the naming style recommended by Damian Conway in |
42 | I<Perl Best Practices>. |
43 | |
44 | If you define an attribute with a leading underscore, then both the |
45 | get and set method will also have an underscore prefix. |
46 | |
47 | If you explicitly set a "reader" or "writer" name when creating an |
48 | attribute, then that attribute's naming scheme is left unchanged. |
49 | |
50 | =head1 BUGS |
51 | |
52 | Please report any bugs or feature requests to |
53 | C<bug-moosex-followpbp@rt.cpan.org>, or through the web interface at |
54 | L<http://rt.cpan.org>. I will be notified, and then you'll |
55 | automatically be notified of progress on your bug as I make changes. |
56 | |
57 | =cut |