| Class::MOP::Method::Accessor - Method Meta Object for accessors |
Class::MOP::Method::Accessor - Method Meta Object for accessors
use Class::MOP::Method::Accessor;
my $reader = Class::MOP::Method::Accessor->new(
attribute => $attribute,
is_inline => 1,
accessor_type => 'reader',
);
$reader->body->($instance); # call the reader method
This is a Class::MOP::Method subclass which is used interally
by Class::MOP::Attribute to generate accessor code. It can
handle generation of readers, writers, predicate and clearer
methods, both as closures and as more optimized inline methods.
%options,
these options are:
Class::MOP::Attribute which this
accessor is being generated for. This paramter is required.
new.
new.
new.
These methods will generate appropriate code references for
the various types of accessors which are supported by
Class::MOP::Attribute. The names pretty much explain it all.
Stevan Little <stevan@iinteractive.com>
Copyright 2006-2008 by Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Class::MOP::Method::Accessor - Method Meta Object for accessors |