X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FRole.pm;h=3789245ff5ef9317db9cb06358d7d36f4061c722;hb=c460adf158d4b2736a8fe137b84a44ccb6d0da94;hp=2dff118736873404ee386c8de7a66806fc158139;hpb=699a2e32b7c7ef959a47fc09e77b7f5336bb72f9;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Role.pm b/lib/Moose/Meta/Role.pm index 2dff118..3789245 100644 --- a/lib/Moose/Meta/Role.pm +++ b/lib/Moose/Meta/Role.pm @@ -9,7 +9,7 @@ use Scalar::Util 'blessed'; use Carp 'confess'; use Devel::GlobalDestruction 'in_global_destruction'; -our $VERSION = '1.14'; +our $VERSION = '1.15'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -479,12 +479,15 @@ sub create { || confess "You must pass a HASH ref of methods" if exists $options{methods}; + $options{meta_name} = 'meta' + unless exists $options{meta_name}; + my (%initialize_options) = %options; delete @initialize_options{qw( package attributes methods - no_meta + meta_name version authority )}; @@ -493,7 +496,8 @@ sub create { $meta->_instantiate_module( $options{version}, $options{authority} ); - $meta->_add_meta_method if !$options{no_meta}; + $meta->_add_meta_method($options{meta_name}) + if defined $options{meta_name}; if (exists $options{attributes}) { foreach my $attribute_name (keys %{$options{attributes}}) {