X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FRole%2FComposite.pm;h=2563a309096c9f2c1b3abfc5eac933e037d1e331;hb=3d24a30e079d69e9f605c0c98c8041dcb3119a62;hp=3461e8457d1e942475c5dc8c2c98a70df230650c;hpb=c45384475d0d20e835d5666615ce15b17e79ff4b;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Role/Composite.pm b/lib/Moose/Meta/Role/Composite.pm index 3461e84..2563a30 100644 --- a/lib/Moose/Meta/Role/Composite.pm +++ b/lib/Moose/Meta/Role/Composite.pm @@ -4,12 +4,11 @@ use strict; use warnings; use metaclass; -use Carp 'confess'; -use Scalar::Util 'blessed', 'reftype'; +use Carp 'confess'; +use Scalar::Util 'blessed'; -use Data::Dumper; - -our $VERSION = '0.01'; +our $VERSION = '0.56'; +$VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; use base 'Moose::Meta::Role'; @@ -41,7 +40,7 @@ sub new { # and the name is created from the # roles if one has not been provided $params{name} ||= (join "|" => map { $_->name } @{$params{roles}}); - $class->meta->new_object(%params); + $class->_new(\%params); } # NOTE: @@ -56,8 +55,11 @@ sub alias_method { # make sure to bless the # method if nessecary - $method = $self->method_metaclass->wrap($method) - if !blessed($method); + $method = $self->method_metaclass->wrap( + $method, + package_name => $self->name, + name => $method_name + ) if !blessed($method); $self->get_method_map->{$method_name} = $method; } @@ -109,4 +111,4 @@ L This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. -=cut \ No newline at end of file +=cut