X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FExporter.pm;h=d1d4cab0c0217173cc016d4e5d65ff47a3fbbdec;hb=85fcb11fc6e4399579ed35d130a9dd43748f5b12;hp=e7cdec8deecc641feb6c97ffa003256d02a438b0;hpb=8b5074ce1a5038824f1e1177cd00d1bcfec5a9fb;p=gitmo%2FMoose.git diff --git a/lib/Moose/Exporter.pm b/lib/Moose/Exporter.pm index e7cdec8..d1d4cab 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.97'; +our $VERSION = '1.14'; 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(...) >>