## Class::MOP::Method
Class::MOP::Method->meta->add_attribute(
Class::MOP::Attribute->new('body' => (
- reader => { 'body' => \&Class::MOP::Method::body },
+ lazy => 1,
+ default => \&Class::MOP::Method::body,
))
);
confess "No body to initialize, " . __PACKAGE__ . " is an abstract base class";
}
+sub body {
+ my $self = shift;
+
+ $self->{'body'} ||= do {
+ $self->_initialize_body;
+ };
+
+ return $self->{'body'};
+}
+
sub _eval_closure {
# my ($self, $captures, $sub_body) = @_;
my $__captures = $_[1];