From 288409a1c2eae469007d477d17336a57d3a9ab1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20H=C3=A4rter?= Date: Mon, 10 Jul 2023 17:07:46 +0200 Subject: [PATCH] Merge pull request 'issue-1-config_file' (#3) from issue-1-config_file into master --- F1DataBot.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/F1DataBot.pm b/F1DataBot.pm index 63fdc00..8d5c4d6 100644 --- a/F1DataBot.pm +++ b/F1DataBot.pm @@ -9,6 +9,7 @@ no warnings qw(experimental); # core packages use Encode; +use FindBin; # CPAN packages use JSON; @@ -19,7 +20,7 @@ use YAML; package F1DataBot; # Constants and initalisations -Log::Log4perl->init('log.conf'); +Log::Log4perl->init("$FindBin::Bin/log.conf"); sub new { my ( $Type, %Param ) = @_; @@ -38,7 +39,7 @@ sub new { }; # load remembered update ids - $Self->{MessageIDs} = YAML::LoadFile('message_ids.yml'); + $Self->{MessageIDs} = YAML::LoadFile("$FindBin::Bin/message_ids.yml"); return $Self; }