@@ -, +, @@ --- Koha/Plugins.pm | 3 ++- Koha/Plugins/Handler.pm | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) --- a/Koha/Plugins.pm +++ a/Koha/Plugins.pm @@ -19,6 +19,7 @@ package Koha::Plugins; use Modern::Perl; +use Array::Utils qw(array_minus); use Class::Inspector; use List::MoreUtils qw(any); use Module::Load::Conditional qw(can_load); @@ -32,7 +33,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 '.'; } --- a/Koha/Plugins/Handler.pm +++ a/Koha/Plugins/Handler.pm @@ -19,6 +19,7 @@ package Koha::Plugins::Handler; use Modern::Perl; +use Array::Utils qw(array_minus); use File::Path qw(remove_tree); use Module::Load qw(load); @@ -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 '.' ; } --