X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FExporter.pm;h=0b8966336260c0604a24ffbba61b09d82c7b7097;hb=db236a63c00371129c2254251aaa1408f044cd89;hp=076141c983cf26cb7cf6a91ecc14cdf37895ca2e;hpb=c5fc2c2158738aaf493b6ae45e93596978c6eb1d;p=gitmo%2FMoose.git diff --git a/lib/Moose/Exporter.pm b/lib/Moose/Exporter.pm index 076141c..0b89663 100644 --- a/lib/Moose/Exporter.pm +++ b/lib/Moose/Exporter.pm @@ -3,19 +3,21 @@ package Moose::Exporter; use strict; use warnings; -our $VERSION = '0.93'; +our $VERSION = '1.10'; +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); use XSLoader; -XSLoader::load( 'Moose', $VERSION ); +XSLoader::load( 'Moose', $XS_VERSION ); my %EXPORT_SPEC; @@ -544,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}, @@ -644,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 @@ -690,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(...) >>