X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FPlugin%2FCommands.pm;h=ae1c1187d6f5a27e19189c5582480fae108f9e78;hb=0b5d24302fd762cbe7a44c17ded49158ee5697da;hp=a4c8fcf250797f32c7b4542d55c38ea1813982de;hpb=cfd1094b45c394258ccda08216f1435bf40e1d50;p=p5sagit%2FDevel-REPL.git diff --git a/lib/Devel/REPL/Plugin/Commands.pm b/lib/Devel/REPL/Plugin/Commands.pm index a4c8fcf..ae1c118 100644 --- a/lib/Devel/REPL/Plugin/Commands.pm +++ b/lib/Devel/REPL/Plugin/Commands.pm @@ -1,18 +1,24 @@ +use strict; +use warnings; package Devel::REPL::Plugin::Commands; +# ABSTRACT: Generic command creation plugin using injected functions + +our $VERSION = '1.003029'; use Devel::REPL::Plugin; use Scalar::Util qw(weaken); +use namespace::autoclean; -use namespace::clean -except => [ 'meta' ]; -use vars qw($COMMAND_INSTALLER); +our $COMMAND_INSTALLER; has 'command_set' => ( - is => 'ro', required => 1, + is => 'ro', lazy => 1, default => sub { {} } ); sub BEFORE_PLUGIN { my ($self) = @_; + $self->load_plugin('Packages'); unless ($self->can('setup_commands')) { $self->meta->add_method('setup_commands' => sub {}); } @@ -62,12 +68,3 @@ around 'compile' => sub { }; 1; - -__END__ - -=head1 NAME - -Devel::REPL::Plugin::Commands - Generic command creation plugin using injected functions - -=cut -