Lines Matching defs:pod2usage

18 Pod::Usage, pod2usage() - print a usage message from embedded pod documentation
29 pod2usage($message_text);
31 pod2usage($exit_status);
33 pod2usage( { -message => $message_text ,
38 pod2usage( -msg => $message_text ,
45 B<pod2usage> should be given either a single argument, or a list of
122 B<pod2usage> will print a usage message for the invoking script (using
201 B<pod2usage> doesn't force the above conventions upon you, but it will
203 ability of B<pod2usage()> to accept a single number or a string makes it
210 GetOptions("help", "man", "flag1") || pod2usage(2);
211 pod2usage(1) if ($opt_help);
212 pod2usage(-verbose => 2) if ($opt_man);
215 pod2usage("$0: Too many files given.\n") if (@ARGV > 1);
225 GetOptions("help", "man", "flag1") || pod2usage(-verbose => 0);
226 pod2usage(-verbose => 1) if ($opt_help);
227 pod2usage(-verbose => 2) if ($opt_man);
230 pod2usage(-verbose => 2, -message => "$0: Too many files given.\n")
234 B<pod2usage()> adheres to this philosophy. If you are interested in
235 seeing a number of different ways to invoke B<pod2usage> (although by no
240 Each of the following invocations of C<pod2usage()> will print just the
243 pod2usage();
245 pod2usage(2);
247 pod2usage(-verbose => 0);
249 pod2usage(-exitval => 2);
251 pod2usage({-exitval => 2, -output => \*STDERR});
253 pod2usage({-verbose => 0, -output => \*STDERR});
255 pod2usage(-exitval => 2, -verbose => 0);
257 pod2usage(-exitval => 2, -verbose => 0, -output => \*STDERR);
259 Each of the following invocations of C<pod2usage()> will print a message
264 pod2usage("Syntax error.");
266 pod2usage(-message => "Syntax error.", -verbose => 0);
268 pod2usage(-msg => "Syntax error.", -exitval => 2);
270 pod2usage({-msg => "Syntax error.", -exitval => 2, -output => \*STDERR});
272 pod2usage({-msg => "Syntax error.", -verbose => 0, -output => \*STDERR});
274 pod2usage(-msg => "Syntax error.", -exitval => 2, -verbose => 0);
276 pod2usage(-message => "Syntax error.",
281 Each of the following invocations of C<pod2usage()> will print the
285 pod2usage(1);
287 pod2usage(-verbose => 1);
289 pod2usage(-exitval => 1);
291 pod2usage({-exitval => 1, -output => \*STDOUT});
293 pod2usage({-verbose => 1, -output => \*STDOUT});
295 pod2usage(-exitval => 1, -verbose => 1);
297 pod2usage(-exitval => 1, -verbose => 1, -output => \*STDOUT});
299 Each of the following invocations of C<pod2usage()> will print the
302 pod2usage(-verbose => 2);
304 pod2usage({-verbose => 2, -output => \*STDOUT});
306 pod2usage(-exitval => 1, -verbose => 2);
308 pod2usage({-exitval => 1, -verbose => 2, -output => \*STDOUT});
328 GetOptions('help|?' => \$help, man => \$man) or pod2usage(2);
329 pod2usage(1) if $help;
330 pod2usage(-verbose => 2) if $man;
334 pod2usage("$0: No files given.") if ((@ARGV == 0) && (-t STDIN));
372 By default, B<pod2usage()> will use C<$0> as the path to the pod input
374 properly (although if C<$0> isn't found, B<pod2usage()> will search
380 pod2usage(-exitval => 2, -input => "/path/to/your/pod/docs");
408 @EXPORT = qw(&pod2usage);
427 sub pod2usage {