The POD::Auto
Perl module looks for the correct flag in the program
arguments and (when found) opens the embed POD. Searches for any
given flag (short, long or both) or --help
by default.
After installing, check perldoc POD::Auto
for a complete description
of the available functionality.
Install with cpanm:
$ cpanm git://github.com/tessarin/p5-POD-Auto.git
Simply use
'ing the module in a program will make it detect --help
:
use POD::Auto;
# code and POD
$ prg # execute normally
$ prg --help # call perldoc, opening man page
use POD::Auto "h"; # search for `-h`
use POD::Auto "h|help"; # search for `-h` or `--help`