#!/usr/bin/perl use strict; use warnings; use Carp; use Pod::Usage qw( pod2usage ); use Getopt::Long qw( :config gnu_getopt ); use version; my $VERSION = qv('0.0.1'); my %config; GetOptions(\%config, 'usage', 'help', 'man', 'version') or pod2usage(-verbose => 99, -sections => 'USAGE');; pod2usage("$0 v$VERSION") if $config{version}; pod2usage(-verbose => 99, -sections => 'USAGE') if $config{usage}; pod2usage(-verbose => 99, -sections => 'EXAMPLES|USAGE|OPTIONS') if $config{help}; pod2usage(-verbose => 2) if $config{man}; # Other recommended modules (uncomment to use): # use IO::Prompt; # use Readonly; # use Data::Dumper; # use Log::Log4perl qw( :easy ); # Script implementation here __END__ =head1 NAME - [A line to describe the script] =head1 VERSION See version at beginning of script, variable $VERSION. =head1 EXAMPLES shell$ =for the author: Some brief example to show the most common usage for the script. This will probably be the most read section, so include meaningful examples. =head1 USAGE [--usage] [--help] [--man] [--version] =for the author: Include a complete usage block of text, like any other good command =head1 DESCRIPTION =for the author: A complete description of the script and its characteristics, with a possible structure into deeper sections (via =head2, =head3). Leave options description for the next section! =head1 OPTIONS =for the author A description of all the available options that the script accepts. The pre-defined ones are already included, of course. =over =item --usage print a concise usage line and exit. =item --help print a somewhat more verbose help, showing usage, this description of the options and some examples from the synopsis. =item --man print out the full documentation for the script. =item --version print the version of the script. =back =head1 DIAGNOSTICS =for the author Include all error messages and possible exit conditions, even those that "should never happen". =over =item C<< Error message here, perhaps with %s placeholders >> [Description of first error...] =item C<< Another error message here >> [Description of another error...] [... and so on...] =back =head1 CONFIGURATION AND ENVIRONMENT =for the author Describe any configuration file that is used by the script, and any environment variable that affects the its behaviour. Include details about the position of the files, their formats, etc. requires no configuration files or environment variables. =head1 DEPENDENCIES =for the author A list of all modules the script is based for, together with an indication of their version and the required perl version. None. =head1 BUGS AND LIMITATIONS =for the author A list of all known problem about the script, with an indication of when (and if) they will be eventually solved. Also include a description of all feature restrictions and limitations. No bugs have been reported. Please report any bugs or feature requests to the AUTHOR =head1 AUTHOR Flavio Poletti C =head1 LICENCE AND COPYRIGHT Copyright (c) 2006, Flavio Poletti C. All rights reserved. This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See L and L. =head1 DISCLAIMER OF WARRANTY BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. =cut