Expected Config File Locations
abigail at abigail.be
Tue Aug 30 18:26:55 BST 2011
On Tue, Aug 30, 2011 at 04:44:10PM +0100, Smylers wrote:
> Abigail writes:
> > On Tue, Aug 30, 2011 at 01:55:48PM +0100, Smylers wrote:
> > > Hi. I'm looking for some advice on where I should
> ... ask users to ...
> > > put the config file for a command I'm distributing on Cpan. Where
> > > would you
> ... expect ...
> > > it to be? I'm interested in opinions of Windows, Mac, and Unix
> > > users, for both per-user and system-wide config.
> Um, sorry for missing words out of my original question.
> > while directory defaults are found in the current working directory.
> I hadn't considered directory configuration files. Thanks.
> > I can only tell you what I would do.
> Thanks, given that there isn't clearly one right way, opinions are what
> I'm seeking.
> > For an application womble, I'd look for $PREFIX/etc/womblerc, and
> > /etc/womblerc, loading the first one found. The load $HOME/.womblerc
> > (if exists). Finally, look for ./.womblerc, and load that as well (if
> > exist).
> OK. By $PREFIX do you mean the parent directory of where the command is
> installed -- so /usr/local/bin/womble uses /usr/local/etc/womblerc and
> /usr/bin/womble uses /usr/etc/womblerc?
$PREFIX would be whatever prefix is given when configuring the package
(for instance, --prefix when running ./configure or Perls
This typically is the parent directory of where the command is installed
(as $PREFIX/bin is the default place to install the command).
More information about the london.pm