use Sub::Name 'subname';
use Devel::GlobalDestruction 'in_global_destruction';
-our $VERSION = '0.89';
+our $VERSION = '0.90';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
# and now make sure to wrap it
# even if it is already wrapped
# because we need a new sub ref
- $method = $wrapped_metaclass->wrap($method);
+ $method = $wrapped_metaclass->wrap($method,
+ package_name => $self->name,
+ name => $method_name,
+ );
}
else {
# now make sure we wrap it properly
- $method = $wrapped_metaclass->wrap($method)
- unless $method->isa($wrapped_metaclass);
+ $method = $wrapped_metaclass->wrap($method,
+ package_name => $self->name,
+ name => $method_name,
+ ) unless $method->isa($wrapped_metaclass);
}
$self->add_method($method_name => $method);
return $method;
Class::MOP::load_class($trait);
for my $meth ( Class::MOP::Class->initialize($trait)->get_all_methods ) {
my $meth_name = $meth->name;
- next if $immutable_meta->has_method( $meth_name );
if ( $immutable_meta->find_method_by_name( $meth_name ) ) {
$immutable_meta->add_around_method_modifier( $meth_name, $meth->body );