use warnings;
use metaclass;
-use Carp 'confess';
-use Scalar::Util 'blessed', 'reftype';
+use Scalar::Util 'blessed';
-our $VERSION = '0.01';
+our $VERSION = '0.57';
+$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
use base 'Moose::Meta::Role';
my ($class, %params) = @_;
# the roles param is required ...
($_->isa('Moose::Meta::Role'))
- || confess "The list of roles must be instances of Moose::Meta::Role, not $_"
+ || Moose::throw_error("The list of roles must be instances of Moose::Meta::Role, not $_")
foreach @{$params{roles}};
# 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:
sub alias_method {
my ($self, $method_name, $method) = @_;
(defined $method_name && $method_name)
- || confess "You must define a method name";
+ || Moose::throw_error("You must define a method name");
# 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;
}
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