$instance->$initializer($value, $callback, $self);
}
-# NOTE:
-# the next bunch of methods will get bootstrapped
-# away in the Class::MOP bootstrapping section
-
-#sub associated_class { $_[0]->{'associated_class'} }
-#sub associated_methods { $_[0]->{'associated_methods'} }
-
-#sub has_accessor { defined($_[0]->{'accessor'}) }
-#sub has_reader { defined($_[0]->{'reader'}) }
-#sub has_writer { defined($_[0]->{'writer'}) }
-#sub has_predicate { defined($_[0]->{'predicate'}) }
-#sub has_clearer { defined($_[0]->{'clearer'}) }
-#sub has_builder { defined($_[0]->{'builder'}) }
-#sub has_init_arg { defined($_[0]->{'init_arg'}) }
-#sub has_default { defined($_[0]->{'default'}) }
-#sub has_initializer { defined($_[0]->{'initializer'}) }
-#sub has_insertion_order { defined($_[0]->{'insertion_order'}) }
-
-#sub accessor { $_[0]->{'accessor'} }
-#sub reader { $_[0]->{'reader'} }
-#sub writer { $_[0]->{'writer'} }
-#sub predicate { $_[0]->{'predicate'} }
-#sub clearer { $_[0]->{'clearer'} }
-#sub builder { $_[0]->{'builder'} }
-#sub init_arg { $_[0]->{'init_arg'} }
-#sub initializer { $_[0]->{'initializer'} }
-#sub definition_context { $_[0]->{'definition_context'} }
-#sub insertion_order { $_[0]->{'insertion_order'} }
-#sub _set_insertion_order { $_[0]->{'insertion_order'} = $_[1] }
-
-# end bootstrapped away method section.
-# (all methods below here are kept intact)
-
sub has_read_method { $_[0]->has_reader || $_[0]->has_accessor }
sub has_write_method { $_[0]->has_writer || $_[0]->has_accessor }
return $meta;
}
-## Attribute readers
-
-# NOTE:
-# all these attribute readers will be bootstrapped
-# away in the Class::MOP bootstrap section
-
-#sub get_attribute_map { $_[0]->{'attributes'} }
-#sub attribute_metaclass { $_[0]->{'attribute_metaclass'} }
-#sub instance_metaclass { $_[0]->{'instance_metaclass'} }
-#sub immutable_trait { $_[0]->{'immutable_trait'} }
-#sub constructor_class { $_[0]->{'constructor_class'} }
-#sub constructor_name { $_[0]->{'constructor_name'} }
-#sub destructor_class { $_[0]->{'destructor_class'} }
# Instance Construction & Cloning
sub _class_name { $_[0]->{_class_name} ||= $_[0]->associated_metaclass->name }
-#sub associated_metaclass { $_[0]{'associated_metaclass'} }
-
sub create_instance {
my $self = shift;
bless {}, $self->_class_name;
} => $class;
}
-## accessors
-
-#sub associated_metaclass { shift->{'associated_metaclass'} }
-
sub attach_to_class {
my ( $self, $class ) = @_;
$self->{associated_metaclass} = $class;
$self->package_name . '::' . $self->name;
}
-#sub original_method { (shift)->{'original_method'} }
-
-#sub _set_original_method { $_[0]->{'original_method'} = $_[1] }
# It's possible that this could cause a loop if there is a circular
# reference in here. That shouldn't ever happen in normal
} => $class;
}
-## accessors
-
-#sub associated_attribute { (shift)->{'attribute'} }
-#sub accessor_type { (shift)->{'accessor_type'} }
-
## factory
}, $class;
}
-## accessors
-
-#sub options { (shift)->{'options'} }
-#sub associated_metaclass { (shift)->{'associated_metaclass'} }
-
## cached values ...
sub meta_instance {
use constant _PRINT_SOURCE => $ENV{MOP_PRINT_SOURCE} ? 1 : 0;
-## accessors
-
sub new {
confess __PACKAGE__ . " is an abstract base class, you must provide a constructor.";
}
-#sub is_inline { $_[0]{is_inline} }
-#sub definition_context { $_[0]{definition_context} }
-
sub _initialize_body {
confess "No body to initialize, " . __PACKAGE__ . " is an abstract base class";
}
use base 'Class::MOP::Method::Generated';
-#sub _expected_method_class { $_[0]{_expected_method_class} }
-
sub _uninlined_body {
my $self = shift;
\%{$_[0]->{'package'} . '::'}
}
-#sub method_metaclass { $_[0]->{'method_metaclass'} }
-#sub wrapped_method_metaclass { $_[0]->{'wrapped_method_metaclass'} }
-
-#sub _method_map { $_[0]->{'methods'} }
-
# utility methods
{