Added a POD template and pod2usage sample invocation to _utility.skeleton.
This commit is contained in:
parent
fd671cec3d
commit
7e3afc15f0
1 changed files with 42 additions and 0 deletions
|
|
@ -1,8 +1,14 @@
|
|||
use lib "../lib";
|
||||
use strict;
|
||||
use Pod::Usage;
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
|
||||
# Get parameters here, including $help
|
||||
|
||||
pod2usage( verbose => 2 ) if $help;
|
||||
pod2usage() unless $help; # Change condition!
|
||||
|
||||
my $session = start();
|
||||
# Do your work here
|
||||
finish($session);
|
||||
|
|
@ -44,3 +50,39 @@ sub finish {
|
|||
$session->close;
|
||||
}
|
||||
|
||||
__END__
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
||||
utility - A template for WebGUI utility scripts
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
utility --configFile config.conf ...
|
||||
|
||||
utility --help
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This WebGUI utility script helps you...
|
||||
|
||||
=over
|
||||
|
||||
=item B<--configFile config.conf>
|
||||
|
||||
The WebGUI config file to use. Only the file name needs to be specified,
|
||||
since it will be looked up inside WebGUI's configuration directory.
|
||||
This parameter is required.
|
||||
|
||||
=item B<--help>
|
||||
|
||||
Shows this documentation, then exits.
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Copyright 2001-2008 Plain Black Corporation.
|
||||
|
||||
=cut
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue