Expected Config File Locations

Smylers Smylers at stripey.com
Tue Aug 30 16:44:10 BST 2011

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?


Watch fiendish TV quiz 'Only Connect' (some questions by me)
Mondays at 20:30 on BBC4, or iPlayer: http://www.bbc.co.uk/onlyconnect

More information about the london.pm mailing list