NAME

Krang::MethodMaker - extended version of Class::MethodMaker


SYNOPSIS

  # create a readonly foo_id() accessor and standard accessor/mutators
  # title() and url().  Create standard accessor/mutators itchy() and
  # scratchy() that trigger calls to _notify() when set.
  use Krang::ClassLoader MethodMaker => 
    get     => ['foo_id'],
    get_set => ['title', 'url'],
    get_set_with_notify => { method => '_notify',
                             attr   => ['itchy', 'scratchy'] };
  # catch changes to itchy and scratchy
  sub _notify {
    my ($self, $which, $old, $new) = @_;
    # ...
  }


DESCRIPTION

This class extends Class::MethodMaker for use by Krang. All the normal Class::MethodMaker generators are available from Krang::MethodMaker, with a few changes.

When we identify repeated code patterns we should consider adding a method generator to this class.


INTERFACE


TODO


SEE ALSO

Class::MethodMaker

Krang::ElementClass