shail has asked for the wisdom of the Perl Monks concerning the following question:
In one of scripts, wanted to add facilty to set options via configfile alongside getting it from cmdline.
I looked at bunch of different ways to set options using configfile and cmdline.Now main question:
one thing that I did not like in all of them was the fact that you had to deal with same varible three times.
Is there a way I have to deal with the variable just once??
I took a brief look at GetOpt::Declare() and It seems that helps reduce the dealings to twice ...But then it is not as powerful as AppConfg and does not allow reading files...Any smart way to reduce dealing with variables ?
Thoughts on ways to read arguments via configfile also welcome/appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Smart way to deal with cmdline Args?
by chrestomanci (Priest) on Dec 07, 2010 at 22:27 UTC | |
|
Re: Smart way to deal with cmdline Args?
by Anonymous Monk on Dec 07, 2010 at 22:24 UTC | |
by shail (Initiate) on Dec 08, 2010 at 17:29 UTC | |
|
Re: Smart way to deal with cmdline Args?
by kevbot (Vicar) on Dec 10, 2010 at 08:52 UTC |