3 package Devel::REPL::Meta::Plugin;
5 our $VERSION = '1.003030';
8 use namespace::autoclean;
10 extends 'Moose::Meta::Role';
12 before 'apply' => sub {
13 my ($self, $other) = @_;
14 return unless $other->isa('Devel::REPL');
15 if (my $pre = $self->get_method('BEFORE_PLUGIN')) {
16 $pre->body->($other, $self);
20 after 'apply' => sub {
21 my ($self, $other) = @_;
22 return unless $other->isa('Devel::REPL');
23 if (my $pre = $self->get_method('AFTER_PLUGIN')) {
24 $pre->body->($other, $self);