1) I don't
think this is a problem. I'm pretty diligent about checking the permissions of the config to ensure the permissions don't allow anyone other than the intended user to make changes to it. The config must be executed with the same permissions as the calling script, so that's the desired affect.
2) This one comes down to situation. Some of the stuff I've considered this for, I'm only doing because it's my own system and I'm playing admin for those users I wouldn't want to ask to write any config, however simple (no good making Mom learn Perl when she struggles with email :).
In other situations, I expect those installing and configuring the utility to be at least perl initiates if not adepts - and I comment my packaged configs almost to the point of TMI. Regardless, I only use it for tools others have to manage when I'm in an environment where I am justified in my opposition to administration by monkeys. Even then, I try to comment enough to give even a monkey no excuse for screwing it up.
* So, it appears the only real downside is the extra (minor) hoops I have to jump through to ensure the config can't be tampered with by anyone other than the calling userid, and the complexity left on the shoulders of the person actually configuring the tool.
Am I right?
* Another question is one of scope. I mentioned that I always use strict in these scripts, and limit all vars to "my" scope except those intended to be overridden by the config, which are put under "our" scope. This is one thing I'm not terribly confident of my understanding. Can the config modify the values of "my" scoped vars, or is it limited to modifying "our" scoped vars?
Of course, I know that my current technique doesn't prevent the config from running off on its own tangent during the config process.
Thanks again!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.