X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDevel-REPL.git;a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FPlugin%2FCompletionDriver%2FINC.pm;h=debab1534f5a2c6045c4db674ca186797abbefbf;hp=2409a706d504852c6447a693d02454b64e75a5c1;hb=54beb05dd302b5e166bf46c888318527e13375c7;hpb=3a40071593734bf02e987a076b6408095ecfad41 diff --git a/lib/Devel/REPL/Plugin/CompletionDriver/INC.pm b/lib/Devel/REPL/Plugin/CompletionDriver/INC.pm index 2409a70..debab15 100644 --- a/lib/Devel/REPL/Plugin/CompletionDriver/INC.pm +++ b/lib/Devel/REPL/Plugin/CompletionDriver/INC.pm @@ -1,8 +1,14 @@ +use strict; +use warnings; package Devel::REPL::Plugin::CompletionDriver::INC; + +our $VERSION = '1.003027'; + 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; @@ -63,7 +69,7 @@ around complete => sub { 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 = ( @@ -76,7 +82,7 @@ around complete => sub { 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 = $_; @@ -99,7 +105,7 @@ around complete => sub { } }; - # look through all of + # look through all of INC: for (@INC) { my $path = $_;