sub import {
my ( $self, @plugins ) = @_;
my $caller = caller(0);
no strict 'refs';
push @{"${caller}::ISA"}, $self;
sub import {
my ( $self, @plugins ) = @_;
my $caller = caller(0);
no strict 'refs';
push @{"${caller}::ISA"}, $self;
# The plugin caller should be our application class
eval "package $caller; require Maypole::Plugin::$_";
if ($@) { warn qq(Loading plugin "Maypole::Plugin::$_" failed: $@) }
else {
warn "Loaded plugin: Maypole::Plugin::$_" if $caller->debug;
# The plugin caller should be our application class
eval "package $caller; require Maypole::Plugin::$_";
if ($@) { warn qq(Loading plugin "Maypole::Plugin::$_" failed: $@) }
else {
warn "Loaded plugin: Maypole::Plugin::$_" if $caller->debug;