X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FExporter.pm;h=c1cd258d73b5027af037e5ce79f4eaf9da5d650c;hb=6b2f825e73f66af279fa9e0802bc06a0094e5e89;hp=2ed68cbc6ee32544a002ad10f4bca7ac3fdca01f;hpb=b7ef2be4b4b814c7ef52b96cc33e7fb4581428ba;p=gitmo%2FMoose.git diff --git a/lib/Moose/Exporter.pm b/lib/Moose/Exporter.pm index 2ed68cb..c1cd258 100644 --- a/lib/Moose/Exporter.pm +++ b/lib/Moose/Exporter.pm @@ -3,13 +3,14 @@ package Moose::Exporter; use strict; use warnings; -our $VERSION = '0.95'; +our $VERSION = '1.11'; our $XS_VERSION = $VERSION; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; use Class::MOP; use List::MoreUtils qw( first_index uniq ); +use Moose::Deprecated; use Moose::Util::MetaRole; use Sub::Exporter 0.980; use Sub::Name qw(subname); @@ -545,11 +546,13 @@ sub _make_init_meta { return unless Class::MOP::class_of( $options{for_class} ); - Moose::Util::MetaRole::apply_metaroles( - for => $options{for_class}, - %new_style_roles, - %old_style_roles, - ); + if ( %new_style_roles || %old_style_roles ) { + Moose::Util::MetaRole::apply_metaroles( + for => $options{for_class}, + %new_style_roles, + %old_style_roles, + ); + } Moose::Util::MetaRole::apply_base_class_roles( for_class => $options{for_class}, @@ -645,7 +648,7 @@ functions from the original package, they will I be cleaned. If you pass any parameters for L, this method will generate an C for you as well (see below for details). This -C will call C and +C will call C and C as needed. Note that if any of these methods already exist, they will not be @@ -691,7 +694,7 @@ when C is called. You can also provide parameters for C and C. Specifically, valid parameters -are "class_metaroles", "role_metaroles", and "base_object_roles". +are "class_metaroles", "role_metaroles", and "base_class_roles". =item B<< Moose::Exporter->build_import_methods(...) >>