1 package Devel::REPL::Meta::Plugin;
5 extends 'Moose::Meta::Role';
7 before 'apply' => sub {
8 my ($self, $other) = @_;
9 return unless $other->isa('Devel::REPL');
10 if (my $pre = $self->get_method('BEFORE_PLUGIN')) {
11 $pre->body->($other, $self);
15 after 'apply' => sub {
16 my ($self, $other) = @_;
17 return unless $other->isa('Devel::REPL');
18 if (my $pre = $self->get_method('AFTER_PLUGIN')) {
19 $pre->body->($other, $self);