X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FPlugin%2FCompletion.pm;h=e87521c41edd1424817ad69350dcd4e542eedee7;hb=refs%2Fheads%2Fmoo;hp=1e2b09aca9e1243271dbd086b19db18f1d93e05a;hpb=fd81abf13426f0eea8915247e7909d20a4f98661;p=p5sagit%2FDevel-REPL.git diff --git a/lib/Devel/REPL/Plugin/Completion.pm b/lib/Devel/REPL/Plugin/Completion.pm index 1e2b09a..e87521c 100644 --- a/lib/Devel/REPL/Plugin/Completion.pm +++ b/lib/Devel/REPL/Plugin/Completion.pm @@ -2,30 +2,31 @@ package Devel::REPL::Plugin::Completion; use Devel::REPL::Plugin; use Scalar::Util 'weaken'; use PPI; -use namespace::clean -except => [ 'meta' ]; +use namespace::sweep; +use MooX::Types::MooseLike::Base qw(ArrayRef Int Bool); has current_matches => ( is => 'rw', - isa => 'ArrayRef', + isa => ArrayRef, lazy => 1, default => sub { [] }, ); has match_index => ( is => 'rw', - isa => 'Int', + isa => Int, lazy => 1, default => sub { 0 }, ); has no_term_class_warning => ( - isa => "Bool", + isa => Bool, is => "rw", - default => 0, + default => sub { 0 }, ); has do_readline_filename_completion => ( # so default is no if Completion loaded - isa => "Bool", + isa => Bool, is => "rw", lazy => 1, default => sub { 0 }, @@ -126,6 +127,13 @@ __END__ Devel::REPL::Plugin::Completion - Extensible tab completion +=head1 NOTE + +By default, the Completion plugin explicitly does I use the Gnu readline +or Term::ReadLine::Perl fallback filename completion. + +Set the attribute C to 1 to enable this feature. + =head1 AUTHOR Shawn M Moore, C<< >>