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