I've written a convenience library for some scripts I'm working on. It wraps Getopt::Long
into something a little simpler, in addition to providing mandatory arguments. As such, the library adds a number of arguments to the script's list of required/possible command line arguments.
Since the script also calls pod2usage on the --help
flag, I'd like some way for the library to provide the definitions of each of these flags that it provides to the individual script, so it can be rendered when pod2usage is called.
For instance, with a --dosomething
flag added by my library, is there anyway, when I run a.pl --help
, it will include both the help definitions provided by a.pl
, but also the definitions provided by the library, like that of --dosomething
which a.pl
may not know about?
Is there any way to accomplish this—to have a library modify a script's POD at runtime?