The current working directory in Perl should be retrieved using Cwd, not
$ENV{PWD}. Regardless, putting paths in your program based on CWD is a bug,
since the program could be run with any CWD and that should not change its
behavior. I wrote a similar module to the FindBin interface using the same
Thanks to both of you, I managed to get past loading modules while starting
the service from systemd. Now there is another bug regarding relative paths
and I wonder how to solve it, it seems lib::relative might not do the trick
my $homedir = $ENV{'HOME'};
my $cwd = $ENV{'PWD'};
my $log = Mojo::L