Mailmunge::Base - Base class for Mailmunge objects
Mailmunge::Base offers a convenience function for creating accessors to get and set instance variables.
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;
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.
Dianne Skoll <email@example.com>
This code is licensed under the terms of the GNU General Public License, version 2.
Copyright © 2021 Skoll Software Consulting