Lines 20-25
package Koha::Plugins;
Link Here
|
20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
21 |
|
21 |
|
22 |
use Class::Inspector; |
22 |
use Class::Inspector; |
|
|
23 |
use File::Find::Rule; |
23 |
use List::MoreUtils qw(any); |
24 |
use List::MoreUtils qw(any); |
24 |
use Module::Load::Conditional qw(can_load); |
25 |
use Module::Load::Conditional qw(can_load); |
25 |
use Module::Load qw(load); |
26 |
use Module::Load qw(load); |
Lines 32-38
use Koha::Plugins::Methods;
Link Here
|
32 |
BEGIN { |
33 |
BEGIN { |
33 |
my $pluginsdir = C4::Context->config("pluginsdir"); |
34 |
my $pluginsdir = C4::Context->config("pluginsdir"); |
34 |
my @pluginsdir = ref($pluginsdir) eq 'ARRAY' ? @$pluginsdir : $pluginsdir; |
35 |
my @pluginsdir = ref($pluginsdir) eq 'ARRAY' ? @$pluginsdir : $pluginsdir; |
35 |
push( @INC, @pluginsdir ); |
36 |
foreach my $dir ( @pluginsdir ) { |
|
|
37 |
my @dirs = File::Find::Rule->new |
38 |
->maxdepth(1) |
39 |
->directory |
40 |
->in($dir); |
41 |
|
42 |
push( @INC, @dirs ); |
43 |
} |
36 |
pop @INC if $INC[-1] eq '.'; |
44 |
pop @INC if $INC[-1] eq '.'; |
37 |
} |
45 |
} |
38 |
|
46 |
|