Configuration File Convention

Richard Edward Horner rich at richhorner.com
Tue Aug 21 20:14:13 UTC 2007


Partially in response to Robb's request for input on path handling
with his filter rules (I say use absolute paths for reasons I'm about
to explain), I'd like to comment on the current usage of
~/.brackup.conf as the default configuration file. The code handling
this is in lib/Brackup/Config.pm

I feel like this is less than optimal, especially since you are
created a default config file in your home dir if it can't find one.
At the very least, I think the order should be reversed and it checks
the current directory first and then falls back on the home dir. As it
currently is, let's say you're operating from a config file in your
local dir, cd to fix something and then !Brackup without cd-ing back.
Well, you just made a default config file by accident which you now
need to delete in order to use the one you're using.

"Why not just copy that config file to ~/ then?" you ask!

Well, because let's say your company has a server that a couple
different employees have root access on. None of them have the root
password but have sudo rights so that if someone leaves the company,
that person's login is just disabled instead of having to change the
root password and then disseminate the new one to everyone who needs
it. Well, these users are all going to have different home dirs.

"Well, why not have them sudo bash then?" you ask!

Well, because that's really inelegant. Perl coders are about elegance,
right? I mean, that's what's up with the capitol letters and
everything, right? :)

But, no, seriously, I don't like the home dir thing as the first check
especially since a conf file is put there automatically if it can't
find one and I also like absolute paths because sometimes resources
are shared and, therefore, look slightly different to different ppl.

Yes? No? You're an idiot, Rich? I'm really hungover BTW.

Thanks, Rich(ard)
-- 
Richard Edward Horner
Engineer / Composer / Electric Guitar Virtuoso
rich at richhorner.com
http://richhorner.com - updated June 28th


More information about the brackup mailing list