|P is for Practical|
Smart way to deal with cmdline Args?by shail (Initiate)
|on Dec 07, 2010 at 21:47 UTC||Need Help??|
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.