use Devel::REPL::Plugin;
use Scalar::Util qw(weaken);
-use namespace::clean -except => [ 'meta' ];
+use namespace::sweep;
use vars qw($COMMAND_INSTALLER);
has 'command_set' => (
sub BEFORE_PLUGIN {
my ($self) = @_;
+ $self->load_plugin('Packages');
unless ($self->can('setup_commands')) {
- $self->meta->add_method('setup_commands' => sub {});
+ my $pkg = ref $self || $self;
+ no strict 'refs';
+ *{"${pkg}::setup_commands"} = sub { };
}
}
};
1;
+
+__END__
+
+=head1 NAME
+
+Devel::REPL::Plugin::Commands - Generic command creation plugin using injected functions
+
+=cut
+