From: Don Armstrong Date: Thu, 10 Aug 2006 08:02:01 +0000 (+0000) Subject: add perl script template X-Git-Url: https://git.donarmstrong.com/?p=lib.git;a=commitdiff_plain;h=a2b1a8aa27ff0fe5d69669cf02caad1bb4be533e add perl script template --- diff --git a/templates/perl_script b/templates/perl_script new file mode 100755 index 0000000..b4b08d9 --- /dev/null +++ b/templates/perl_script @@ -0,0 +1,69 @@ +#! /usr/bin/perl +# , and is released +# under the terms of the GPL version 2, or any later version, at your +# option. See the file README and COPYING for more information. +# Copyright 2006 by Don Armstrong . +# $Id$ + + +use warnings; +use strict; + +use Getopt::Long; +use Pod::Usage; + +=head1 NAME + + - + +=head1 SYNOPSIS + + [options] + + Options: + --debug, -d debugging level (Default 0) + --help, -h display this help + --man, -m display manual + +=head1 OPTIONS + +=over + +=item B<--debug, -d> + +Debug verbosity. (Default 0) + +=item B<--help, -h> + +Display brief useage information. + +=item B<--man, -m> + +Display this manual. + +=back + +=head1 EXAMPLES + + +=cut + + +use vars qw($DEBUG); + +my %options = (debug => 0, + help => 0, + man => 0, + ); + +GetOptions(\%options,'debug|d+','help|h|?','man|m'); + +pod2usage() if $options{help}; +pod2usage({verbose=>2}) if $options{man}; + +$DEBUG = $options{debug}; + + + + +__END__