plugin metaclass, profiles, commands plugi
[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) = @_;
9 if (my $pre = $self->get_method('BEFORE_PLUGIN')) {
10 $pre->body->($other, $self);
11 }
12};
13
14after 'apply' => sub {
15 my ($self, $other) = @_;
16 if (my $pre = $self->get_method('AFTER_PLUGIN')) {
17 $pre->body->($other, $self);
18 }
19};
20
211;