# The following was supposedly scribed by
# khemir nadim
# on Friday 12 November 2004 05:26 am:
lately I have added, to the application, a self search feature that
extract and display information embeded in pod.
There are already some modules designed to turn your pod into your
options. I opted not to go that route because pod lacks variables
(see the previous discussions under not so plain documentation.)
The primary goal here was to handle user-configurable options with
reasonable defaults (so, of course the user should be able to see
those defaults in the help message (and of course I don't want to
duplicate information.))
I believe it would be good to let the users of you module define
what , how many types and how they want the help. So even my format
is limiting.
I'm more inclined to leave that up to 'app -h | less' or 'perldoc
app'. But, I guess it depends on how many options you have and how
much help is included.
That said, I would like to find a way to integrate pod and help more
closely. However, I think at some point that the change has to
happen in perldoc (say, for instance, a new type of paragraph which
instructs perldoc to call the application with a certain flag
($paragraph = `app --podhelp` or something.)) Currently, I have a
section in my pods which elaborates on each option (there's a script
kicking around here somewhere which does formats help into pod, but I
don't like that approach because changes are a pain.)
You could still have some default values and types for the user that
is happy with what comes standard with the module.
I'm not sure I'm following you here. You want the help in multiple
formats or multiple levels of verbosity?
Searching within the switch help is very usefull and should be
supported.
So, --colorize is an option and 'pbs -hs colorize' shows only the help
for that option? Well, there is a usage() method in Getopt::Helpful
that gets called when you include the '+help' builtin and don't
define a main::usage(). I suppose it could check for leftovers in
@ARGV and change behavior based on that. Alternatively, there could
be a '+helpsearch' builtin which calls a different method entirely.
I'm more inclined to the first approach, so you would just do:
app -h switchname
--Eric
--
It works better if you plug it in!
--Sattinger's Law