Bug 16105: Do not initialize the memory cache if not needed
[srvgit] / Koha / Plugins.pm
index 9e2d4eb..bca7701 100644 (file)
@@ -20,7 +20,7 @@ package Koha::Plugins;
 use Modern::Perl;
 
 use Module::Load::Conditional qw(can_load);
-use Module::Pluggable search_path => ['Koha::Plugin'];
+use Module::Pluggable search_path => ['Koha::Plugin'], except => qr/::Edifact(|::Line|::Message|::Order|::Segment|::Transport)$/;
 
 use C4::Context;
 use C4::Output;
@@ -63,6 +63,8 @@ sub GetPlugins {
 
     foreach my $plugin_class (@plugin_classes) {
         if ( can_load( modules => { $plugin_class => undef } ) ) {
+            next unless $plugin_class->isa('Koha::Plugins::Base');
+
             my $plugin = $plugin_class->new({ enable_plugins => $self->{'enable_plugins'} });
 
             if ($method) {