Bug 17600: Standardize our EXPORT_OK
[srvgit] / Koha / Plugins / Handler.pm
index aa4970c..a32487d 100644 (file)
@@ -19,9 +19,10 @@ package Koha::Plugins::Handler;
 
 use Modern::Perl;
 
-use File::Path qw(remove_tree);
+use Array::Utils qw( array_minus );
+use File::Path qw( remove_tree );
 
-use Module::Load qw(load);
+use Module::Load qw( load );
 
 use C4::Context;
 use Koha::Plugins::Methods;
@@ -29,7 +30,7 @@ use Koha::Plugins::Methods;
 BEGIN {
     my $pluginsdir = C4::Context->config("pluginsdir");
     my @pluginsdir = ref($pluginsdir) eq 'ARRAY' ? @$pluginsdir : $pluginsdir;
-    push( @INC, @pluginsdir );
+    push @INC, array_minus(@pluginsdir, @INC) ;
     pop @INC if $INC[-1] eq '.' ;
 }