From c5b7704897bc431e37a655c6da270b37b7bdb1dd Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 26 Jun 2023 15:48:10 +0000 Subject: [PATCH] Bug 34121: Do not test plugin ahead of time --- Koha/Plugins.pm | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Koha/Plugins.pm b/Koha/Plugins.pm index e2e923f8bc..c305d8635d 100644 --- a/Koha/Plugins.pm +++ b/Koha/Plugins.pm @@ -133,22 +133,6 @@ sub get_enabled_plugins { my %seen = map { $_ => 1 } @plugin_classes; my @plugin_classes = grep { $seen{$_} } @plugin_classes_with_method; } - - foreach my $plugin_class (@plugin_classes) { - unless (can_load(modules => { $plugin_class => undef }, nocache => 1)) { - warn "Failed to load $plugin_class: $Module::Load::Conditional::ERROR"; - next; - } - - my $plugin = eval { $plugin_class->new() }; - if ($@ || !$plugin) { - warn "Failed to instantiate plugin $plugin_class: $@"; - next; - } - - push @$enabled_plugins, $plugin; - } - Koha::Cache::Memory::Lite->set_in_cache(ENABLED_PLUGINS_CACHE_KEY, $enabled_plugins); } return @$enabled_plugins; -- 2.30.2