#!/usr/bin/perl -w

=head1 NAME

[PROGRAM-NAME] - [SHORT ONE-LINE DESCRIPTION]

=head1 SYNOPSIS

[CODE FRAGMENT]

=head1 DESCRIPTION

[DESCRIPTION]

=head2 A Sample Subsection

=head2 Yet Another Sample Subsection

=head1 OPTIONS

=over 4

=item --debug

Turn on debugging messages.

=item --help

Display the usage of this command.

=item --version

Display program version.

=back

=head1 RETURN VALUE

[DESCRIPTION]

=head1 EXAMPLES

=over 0

=item [command line]

[DESCRIPTION]

=back

=head1 ENVIRONMENT

=over 0

=item [VARIABLE]

[DESCRIPTION]

=back

=head1 FILES

=over 0

=item [FILE]

[DESCRIPTION]

=back

=head1 SEE ALSO

POD (Plain Old Documentation) documentation:
http://www.perl.com/CPAN-local/doc/manual/html/pod/perlpod.html

Example of a manual page:
http://www.perl.com/CPAN-local/doc/manual/html/utils/pod2man.html

=head1 VERSION

TODO

=head1 AUTHOR

Bill Wohler &lt;wohler&#64newt.com>

Copyright (C) 2000, 2021  Newt Software

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, you can find it at
http://www.gnu.org/copyleft/gpl.html or write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

=head1 METHODS

=cut

# Initializations.
BEGIN {
}

# Packages and pragmas.
use Getopt::Long;

use strict;

# Constants.
my $cmd;                                # name by which command called
($cmd = $0) =~ s|^\./||;                # ...minus the leading ./
my $ver = 'TODO';		# program version with CVS noise

# Variables (may be overridden by arguments).
my $debug = 0;				# verbose mode
my $help = 0;				# display usage
my $version = 0;			# display version

# Parse command line.
my %opts;
GetOptions('debug'		=> \$debug,
	   'help'		=> \$help,
	   'version'		=> \$version,
	  ) or usage();

show_version() if ($version);
usage() if ($help);

#[CODE, IN SCRIPTS]



# Public methods.

=head2 usage

Display usage information and exit.

=cut

sub usage {
    print <<EOF;
Usage: $cmd [options]
--debug			print actions that program takes
--help			display this message
--version		display program version
EOF
    exit(1);
}

=head2 show_version

Display version information and exit.

=cut

sub show_version {
    print("$cmd version $ver\n".
          "Copyright (C) Bill Wohler &lt;wohler&#64newt.com>\n\n".
          "$cmd comes with ABSOLUTELY NO WARRANTY.\n\n".
          "This is free software, and you are welcome\n".
          "to redistribute it under certain conditions.\n\n".
          "See `http://www.gnu.org/copyleft/gpl.html' for details.\n");
    exit 0;
}

=head2 new

Construct a new object.

=over 4

=item Parameters

=over 4

=item [ATTRIBUTE]

[DESCRIPTION]

=back

=item Returns

A reference to the new object.

=back

=cut

sub new {
    my $class = shift;
    my $self = {
		'attribute'	=> undef,   # short description for attribute
		'_variable'	=> undef,   # private instance variable
	       };
    bless($self, $class);

    return $self;
}

=head2 attribute

Get or set [ATTRIBUTE] attribute.

=over 4

=item Parameters

=over 4

=item [ATTRIBUTE]

[DESCRIPTION]

=back

=item Returns

The value of the [ATTRIBUTE] attribute.

=back

=cut

sub attribute {
    my $self = shift;

    @_ ? $self->{attribute} = shift : $self->{attribute};
}


# Private methods.

1;

