2.3. POD, Pod::Usage and Friends
- Pod::Usage is a module that displays the POD page associated with the program.
- The following snippet invokes it:
my $variant = $self->{'default_variant'}; my $help = 0; my $man = 0; Getopt::Long::Configure('pass_through'); GetOptions( "g|game=s" => \$variant, 'help|h|?' => \$help, 'man' => \$man ) or pod2usage(2); pod2usage(1) if $help; pod2usage(-exitstatus => 0, -verbose => 2) if $man; |
- Read the perlpod man page for learning how to write POD. POD is easy and fun, and can be converted to many formats. It is especially useful for writing man pages.