X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FPlugin%2FCommands.pm;h=057b63d78e30cb1347ccfe7939ca3cf3626414c0;hp=a4c8fcf250797f32c7b4542d55c38ea1813982de;hb=9d2a4940f5958d82828272364ef754e9290b6113;hpb=cfd1094b45c394258ccda08216f1435bf40e1d50 diff --git a/lib/Devel/REPL/Plugin/Commands.pm b/lib/Devel/REPL/Plugin/Commands.pm index a4c8fcf..057b63d 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.003027'; 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 -