Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (23 sloc) 0.615 kB
use strict;
use warnings;
use Class::MOP::Class;
use Scalar::Util qw(weaken);
use vars qw($METACLASS);
my @method_map = do 'log';
{
no warnings 'redefine';
my $orig = Class::MOP::Class->can('get_method_map');
local *Class::MOP::Class::get_method_map = sub {
my $self = shift;
if (my $cr = shift(@method_map)) {
local $METACLASS = $self;
my ($add, $delete) = @{$cr->()};
$self->{methods} ||= {};
delete @{$self->{methods}}{@$delete};
@{$self->{methods}}{keys %$add} = values %$add;
return $self->{methods};
}
$self->$orig(@_);
};
require Class::MOP;
}
Jump to Line
Something went wrong with that request. Please try again.