Skip Menu |

This queue is for tickets about the Pod-Usage CPAN distribution.

Report information
The Basics
Id: 86932
Status: resolved
Worked: 15 min
Priority: 0/
Queue: Pod-Usage

Owner: Marek.Rouchal [...]
Requestors: michaelgang [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.64

Subject: documentation does not work with use strict
Date: Mon, 15 Jul 2013 10:10:20 +0300
To: bug-Pod-Usage [...]
From: Michael Gang <michaelgang [...]>
Download (untitled) / with headers
text/plain 1.1k
Hi, The example in the module use Pod::Usage <>; use Getopt::Long <>; ## Parse options GetOptions("help", "man", "flag1") || pod2usage(2); pod2usage(1) if ($opt_help); pod2usage(-verbose => 2) if ($opt_man); ## Check for too many filenames pod2usage("$0: Too many files given.\n") if (@ARGV > 1); is based on the fact that use strict is not on. This is generally a bad example as most perl users use strict. There is a much better example in Getopt::Long use <> Getopt::Long; use <> Pod::Usage; my <> $man = 0; my <> $help = 0; GetOptions('help|?' => \$help, man => \$man) or <> pod2usage(2); pod2usage(1) if <> $help; pod2usage(-exitval => 0, -verbose => 2) if <> $man; I would just use this example instead. Thanks, David

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to