Unverified Commit 75c0b0f5 authored by Stefan Hornburg (Racke)'s avatar Stefan Hornburg (Racke)
Browse files

Fix crash without using Module::Runtime.

parent 1e03bf82
......@@ -95,9 +95,6 @@ requires 'List::Util::XS', '>= 1.20';
# Note: 1.22 or later is recommended.
requires 'Locale::Messages', '>= 1.20';
# Used to load plugins
requires 'Module::Runtime';
# MHonArc is used to build Sympa web archives
requires 'MHonArc::UTF8';
......
......@@ -30,7 +30,6 @@ package Sympa::Message::Plugin;
use strict;
use warnings;
use English qw(-no_match_vars);
use Module::Runtime qw(use_module);
use Sympa::Log;
......@@ -59,7 +58,7 @@ sub execute {
unless $hook_module =~ /::/;
unless (exists $handlers{$hook_module . '->' . $hook_name}) {
unless (eval { use_module($hook_module); 1; }) {
unless (eval "require $hook_module") {
$log->syslog('err', 'Cannot load hook module %s: %s',
$hook_module, $EVAL_ERROR);
return undef;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment