Skip to content

PLERD_HOME could be an environment variable #49

@taskboy3000

Description

@taskboy3000

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions