whitespace fixes
[p5sagit/Devel-REPL.git] / lib / Devel / REPL / Plugin / CompletionDriver / INC.pm
index ace936f..cdcf74f 100644 (file)
@@ -1,8 +1,15 @@
+use strict;
+use warnings;
 package Devel::REPL::Plugin::CompletionDriver::INC;
 use Devel::REPL::Plugin;
 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;
@@ -71,7 +78,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 = $_;
@@ -94,7 +101,7 @@ around complete => sub {
     }
   };
 
-  # look through all of 
+  # look through all of
   INC: for (@INC)
   {
     my $path = $_;