pileofrogs has asked for the wisdom of the Perl Monks concerning the following question:
Besseching blessed bretheren and sistren.
This is one of those, "how does everyone handle 'blah'" questions.
When writing scripts I like to make them respond to various levels of verbosity, so:
./foo.pl -v
Might output...
Starting... Working... Finishing... Done...
and
./foo -v -v
Might output
Starting... found config... config looks good... Working... ate 57 apples... ate 23 bananas.. Finishing... threw out apple cores... threw out banana peels... Done...
I'm totally good as far as getting and processing the args (Getopt::Long).
What I'm wondering is, how does everyone handle the bits inside code that produce the output dependant on the verbosity level? Is there a really good module for this? Does everyone just roll their own?
Thanks!
-Pileofrogs
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: controlling script verbosity
by jdporter (Paladin) on May 04, 2007 at 22:53 UTC | |
|
Re: controlling script verbosity
by merlyn (Sage) on May 04, 2007 at 22:14 UTC | |
|
Re: controlling script verbosity
by Cap'n Steve (Friar) on May 05, 2007 at 10:31 UTC |