From: Dave Rolsky Date: Sat, 26 Feb 2011 18:54:42 +0000 (-0600) Subject: Only use applied_attribute metarole with new Moose X-Git-Tag: v0.05~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=657eec56d78dfac9c138484c7c91bad427211d74;p=gitmo%2FMooseX-FollowPBP.git Only use applied_attribute metarole with new Moose --- diff --git a/lib/MooseX/FollowPBP.pm b/lib/MooseX/FollowPBP.pm index e19c904..b9a5679 100644 --- a/lib/MooseX/FollowPBP.pm +++ b/lib/MooseX/FollowPBP.pm @@ -8,15 +8,18 @@ use Moose::Exporter; use Moose::Util::MetaRole; use MooseX::FollowPBP::Role::Attribute; -Moose::Exporter->setup_import_methods( +my %metaroles = ( class_metaroles => { attribute => ['MooseX::FollowPBP::Role::Attribute'], }, - role_metaroles => { - applied_attribute => ['MooseX::FollowPBP::Role::Attribute'], - }, ); +$metaroles{role_metaroles} = { + applied_attribute => ['MooseX::FollowPBP::Role::Attribute'], +} if $Moose::VERSION >= 1.9900; + +Moose::Exporter->setup_import_methods(%metaroles); + 1; # ABSTRACT: Name your accessors get_foo() and set_foo()