-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Inspired from Perl, Java, et al, plerd could have a notion of a home directory which it can at least find the conf file. That way, the following "just works":
$ plerdall --init (accept defaults)
$ export PLERD_HOME=$HOME/plerd
$ plerdall # any action
This can be implemented like:
if (!defined $config_file && exists $ENV{PLERD_HOME}) {
$config_file = "$ENV{PLERD_HOME}/conf/plerd.conf";
}
Given that maybe only the config file lives there, the better option might be to have the default config file be $HOME/.plerd.conf?
That implementation is slicker:
if (!defined $config_file && -e "$ENV{HOME}/.plerd.conf") {
$config_file = "$ENV{HOME}/.plerd.conf";
}
Something to ponder.
Whatever you decide, after a user runs plerdall, I would suggest that plerdall should just work if all defaults were accepted.