From: Dave Houston Date: Mon, 8 Mar 2010 05:25:09 +0000 (-0800) Subject: Dirty fix; checks for ->isa('Devel::REPL') after apply(). X-Git-Tag: v1.003015~46^2~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=036068ec75460f780e0a3bfb1fca67ae719fc569;p=p5sagit%2FDevel-REPL.git Dirty fix; checks for ->isa('Devel::REPL') after apply(). --- diff --git a/lib/Devel/REPL/Meta/Plugin.pm b/lib/Devel/REPL/Meta/Plugin.pm index c9cca5f..cd544c7 100644 --- a/lib/Devel/REPL/Meta/Plugin.pm +++ b/lib/Devel/REPL/Meta/Plugin.pm @@ -6,6 +6,7 @@ extends 'Moose::Meta::Role'; before 'apply' => sub { my ($self, $other) = @_; + return unless $other->isa('Devel::REPL'); if (my $pre = $self->get_method('BEFORE_PLUGIN')) { $pre->body->($other, $self); } @@ -13,6 +14,7 @@ before 'apply' => sub { after 'apply' => sub { my ($self, $other) = @_; + return unless $other->isa('Devel::REPL'); if (my $pre = $self->get_method('AFTER_PLUGIN')) { $pre->body->($other, $self); }