HTML::Mason::MethodMaker(3)

NAME
HTML::Mason::MethodMaker - Used to create simple get & get/set methods in other classes

SYNOPSIS
 use HTML::Mason::MethodMaker ( read_only => 'foo',
                                read_write => [ qw( bar baz ) ] );

DESCRIPTION
This automates the creation of simple accessor methods.

USAGE
This module creates methods when it is `use''d by another module. There are two types of methods: 'read_only' and 'read_write'.

Attributes specified as 'read_only' get an accessor that only returns the value of the attribute. Presumably, these attributes are set via more complicated methods in the class or as a side effect of one of its methods.

Attributes specified as 'read_write' will take a single optional parameter. If given, this parameter will become the new value of the attribute. This value is then returned from the method. If no parameter is given, then the current value is returned.