diff --git a/Koha/Plugins.pm b/Koha/Plugins.pm index 4d0cc82876..a686bf8ec0 100644 --- a/Koha/Plugins.pm +++ b/Koha/Plugins.pm @@ -47,9 +47,10 @@ BEGIN { pop @INC if $INC[-1] eq '.'; # Load plugins early to ensure they're available before any transactions begin + # Skip under "perl -c" to avoid C3 error when syntax checking plugins my $enable_plugins = C4::Context->config("enable_plugins") // 0; - if ($enable_plugins) { + if ( $enable_plugins && !$^C ) { require Koha::Plugins::Loader; Koha::Plugins::Loader->get_enabled_plugins(); }