X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FMeta%2FPlugin.pm;h=bc020d83193250884b02769a0b42bf508fcc6e9c;hb=c45376f3de16a5a467a1a26e63a279f30eb8672d;hp=c9cca5fcb9b0f2eb79844a2d0d1b1993f5d77ab0;hpb=4d33251a9f6d375aaafd8aa274743c68dec8f720;p=p5sagit%2FDevel-REPL.git diff --git a/lib/Devel/REPL/Meta/Plugin.pm b/lib/Devel/REPL/Meta/Plugin.pm index c9cca5f..bc020d8 100644 --- a/lib/Devel/REPL/Meta/Plugin.pm +++ b/lib/Devel/REPL/Meta/Plugin.pm @@ -1,11 +1,17 @@ +use strict; +use warnings; package Devel::REPL::Meta::Plugin; +our $VERSION = '1.003029'; + use Moose; +use namespace::autoclean; 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 +19,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); }