package My::Class;
=pod
=head1 NAME
My::Class -- Does whatever I tell it
=head1 SYNOPSIS
my $my = My::Class->new();
my $paper = eval { $my->fetch_paper() };
if ( $@ ) {
die "Sorry, could not fetch paper because of: $@";
}
=head1 DESCRIPTION
This class defines a multipurpose, serializable and network
transportable object.
=head1 METHODS
=cut
use strict;
@My::Class::ISA = ();
$My::Class::VERSION = '1.1';
=pod
B (constructor)
Create a new instance of this class. Initialize the object with
whatever is in C<\%params>, which are not predefined.
Returns: new instance of this class.
=cut
sub new {
my ( $pkg, $params ) = @_;
my $class = ref $pkg || $pkg;
return bless( $params, $class );
}
=pod
B
Retrieves paper from environment and returns it. Should be wrapped
in an C to catch errors.
Returns: L object.
=cut
sub fetch_paper {
my ( $self ) = @_;
...
}
1;
__END__
=pod
=head1 TO DO
Other operations should be added: fetch_slippers, eat_homework.
=head1 BUGS
Ensure that no C objects are associated with object.
=head1 COPYRIGHT
Same as Perl.
=head1 AUTHORS
J. Appleseed
=cut