It's a pet peeve of mine that Getopt::Long doesn't accept input from anything but @ARGV. I really hope this changes in Perl6 (and no, not just so that it expects input only from @*ARGS ;-) | [reply] [d/l] [select] |
Are there getopt libraries for other languages that take input from places other than the command line? I realize that taking values from the environment or from an rc file might be useful, but I would argue against putting that in the getopt library but rather have applications handle it on a case by case basis.
thor
Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come
| [reply] |
Sure, any c getopt library accepts any command line source you give it, which may or may not be the one your program got. Likewise for Java.
I would have expected a perlish lib to accept an optional arrayref, and fall back on @ARGV if not supplied. (By which I mean, I understand perfectly well how to get around this when I need to, but I don't want to need to.)
| [reply] [d/l] |