+use strict;
+use warnings;
package Devel::REPL::Plugin::CompletionDriver::INC;
+
use Devel::REPL::Plugin;
+use Devel::REPL::Plugin::Completion; # die early if cannot load
use File::Next;
use File::Spec;
-use namespace::clean -except => [ 'meta' ];
+use namespace::autoclean;
+
+sub BEFORE_PLUGIN {
+ my $self = shift;
+ $self->load_plugin('Completion');
+}
around complete => sub {
my $orig = shift;
my @found;
# most VCSes don't litter every single fucking directory with garbage. if you
- # know of any other, just stick them in here. noone wants to complete
+ # know of any other, just stick them in here. No one wants to complete
# Devel::REPL::Plugin::.svn
my %ignored =
(
my $add_recursively;
$add_recursively = sub {
my ($path, $iteration, @more) = @_;
- opendir((my $dirhandle), $path);
+ opendir((my $dirhandle), $path) || return;
for (grep { !$ignored{$_} } readdir $dirhandle)
{
my $match = $_;
}
};
- # look through all of
+ # look through all of
INC: for (@INC)
{
my $path = $_;
Devel::REPL::Plugin::CompletionDriver::INC - Complete module names in use and require
+=head1 AUTHOR
+
+Shawn M Moore, C<< <sartak at gmail dot com> >>
+
=cut