X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FMeta%2FPlugin.pm;h=241478b2685a5eb92bb60590a8800969d233b2dd;hp=c9cca5fcb9b0f2eb79844a2d0d1b1993f5d77ab0;hb=796cd7ec80de14e45ca8221d545aceb7b9bc0b71;hpb=4d33251a9f6d375aaafd8aa274743c68dec8f720 diff --git a/lib/Devel/REPL/Meta/Plugin.pm b/lib/Devel/REPL/Meta/Plugin.pm index c9cca5f..241478b 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.003027'; + 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); }