more Changes formatting fixes
[p5sagit/Devel-REPL.git] / lib / Devel / REPL / Meta / Plugin.pm
CommitLineData
4d33251a 1package Devel::REPL::Meta::Plugin;
2
3use Moose;
4
5extends 'Moose::Meta::Role';
6
7before 'apply' => sub {
8 my ($self, $other) = @_;
036068ec 9 return unless $other->isa('Devel::REPL');
4d33251a 10 if (my $pre = $self->get_method('BEFORE_PLUGIN')) {
11 $pre->body->($other, $self);
12 }
13};
14
15after 'apply' => sub {
16 my ($self, $other) = @_;
036068ec 17 return unless $other->isa('Devel::REPL');
4d33251a 18 if (my $pre = $self->get_method('AFTER_PLUGIN')) {
19 $pre->body->($other, $self);
20 }
21};
22
231;