do not index these secondary packages - they cannot be loaded independently
[p5sagit/Devel-REPL.git] / lib / Devel / REPL / Meta / Plugin.pm
index c9cca5f..241478b 100644 (file)
@@ -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);
   }