← Documentation Index

Mailmunge::Base - Base class for Mailmunge objects

ABSTRACT

Mailmunge::Base offers a convenience function for creating accessors to get and set instance variables.

SYNOPSIS

package MyThing;
use base qw(Mailmunge::Base);

my @accessors = qw(height weight age);

__PACKAGE__->make_accessors(@accessors);

# Defines getters/setters MyThing::height, MyThing::weight and
# MyThing::age
my $thing = MyThing->new();
$thing->age(20);
my $x = $thing->height;

CLASS METHODS

make_accessors(@accessors)

Given an array of accessor names, creates getter and setter methods. Each method is named according to the corresponding element of @accessors. When called with no parameters, it is a getter; when called with one parameter, it is a settor.

AUTHOR

Dianne Skoll <dianne@skollsoft.com>

LICENSE

This code is licensed under the terms of the GNU General Public License, version 2.

Copyright © 2024 Skoll Software Consulting