summaryrefslogtreecommitdiff
path: root/lib/JWebmail.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/JWebmail.pm')
-rw-r--r--lib/JWebmail.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/JWebmail.pm b/lib/JWebmail.pm
index 98001a1..8c01596 100644
--- a/lib/JWebmail.pm
+++ b/lib/JWebmail.pm
@@ -2,6 +2,8 @@ package JWebmail v1.2.0;
use Mojo::Base Mojolicious;
+use Module::Load 'load';
+
use JWebmail::Controller::Webmail;
use JWebmail::Model::ReadMails::Role;
use JWebmail::Model::ReadMails::QMailAuthuser;
@@ -43,7 +45,7 @@ sub startup {
# load plugins
push @{$self->plugins->namespaces}, 'JWebmail::Plugin';
- $self->plugin('INIConfig');
+ $self->plugin('TOMLConfig');
#die unless $self->validateConf;
$self->plugin('ServerSideSessionData');
@@ -57,7 +59,7 @@ sub startup {
my $read_mails = do {
if ($mode eq 'development') {
my $cls = $self->config->{development}{read_mock};
- eval "require $cls" || die "Issue for module $cls with: $@";
+ eval { load $cls; 1 } || die "Issue for module $cls with: $@";
$cls->new;
}
else {