Expected Config File Locations
Smylers at stripey.com
Tue Aug 30 16:25:13 BST 2011
David Precious writes:
> On Tuesday 30 August 2011 13:55:48 Smylers wrote:
> > Hi. I'm looking for some advice on where I should put the config file
> > for a command I'm distributing on Cpan.
> Config::Find looks like it is designed for exactly what you're looking
> for - have you seen that?
Hi David. Thanks for your reply. For some reason I'd spotted
File::ConfigDir but not Config::Find.
It looks like it does the right thing on Unix, and its file naming
scheme that a command called bang has user config in ~/.bang or
~/.bang.conf is reasonable (though ~/.*.conf doesn't match any files in
my home directory).
On Windows, it uses %LOCAL_APPDATA%\bang.cfg (where %LOCAL_APPDATA% is
gleaned from a system %call). How does that seem to Windows users?
However it doesn't seem to support recent Windows versions, crashing on.
Windows 7 and even Vista:
This is particularly irksome since it documents that unsupported Windows
versions fall back to generic behaviour, and also because it currently
does the same thing on all the editions of Windows that it does support,
so distinguishing between them isn't achieving anything. But that's
> It wasn't entirely clear to me whether you're looking for suggestions
> on how to *find* the config file in a sensible location, or how to
> install a default config file into a suitable location ...?
Sorry. It's the former. I want to document where a users should put
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