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