Perl programatically modify POD at runtime -
i've written convenience library scripts i'm working on. wraps getopt::long
little simpler, in addition providing mandatory arguments. such, library adds number of arguments script's list of required/possible command line arguments.
since script calls pod2usage on --help
flag, i'd way library provide definitions of each of these flags provides individual script, can rendered when pod2usage called.
for instance, --dosomething
flag added library, there anyway, when run a.pl --help
, include both definitions provided a.pl
, definitions provided library, of --dosomething
a.pl
may not know about?
is there way accomplish this—to have library modify script's pod @ runtime?
unfortunately pod2usage
static purpose. might @ app::cmd or getopt::long::descriptive (used app::cmd) functionality closer this.
that said don't need use pod2usage print usage statements, helpful way dump scripts own pod.
Comments
Post a Comment