From: gfx Date: Sun, 23 Aug 2009 09:44:39 +0000 (+0900) Subject: Remove old accessors that are commented out X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f7a4bfacced21775d6dede99da13c59b8033968a;p=gitmo%2FClass-MOP.git Remove old accessors that are commented out --- diff --git a/lib/Class/MOP/Attribute.pm b/lib/Class/MOP/Attribute.pm index 1133768..77bba0f 100644 --- a/lib/Class/MOP/Attribute.pm +++ b/lib/Class/MOP/Attribute.pm @@ -155,39 +155,6 @@ sub _set_initial_slot_value { $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 } diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index 49a2adc..6407f70 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -335,19 +335,6 @@ sub create { 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 diff --git a/lib/Class/MOP/Instance.pm b/lib/Class/MOP/Instance.pm index 8023e93..4f3b338 100644 --- a/lib/Class/MOP/Instance.pm +++ b/lib/Class/MOP/Instance.pm @@ -70,8 +70,6 @@ sub _new { 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; diff --git a/lib/Class/MOP/Method.pm b/lib/Class/MOP/Method.pm index 33f5efb..43aa1c2 100644 --- a/lib/Class/MOP/Method.pm +++ b/lib/Class/MOP/Method.pm @@ -65,10 +65,6 @@ sub _new { } => $class; } -## accessors - -#sub associated_metaclass { shift->{'associated_metaclass'} } - sub attach_to_class { my ( $self, $class ) = @_; $self->{associated_metaclass} = $class; @@ -85,9 +81,6 @@ sub fully_qualified_name { $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 diff --git a/lib/Class/MOP/Method/Accessor.pm b/lib/Class/MOP/Method/Accessor.pm index 7fcbc31..b81169e 100644 --- a/lib/Class/MOP/Method/Accessor.pm +++ b/lib/Class/MOP/Method/Accessor.pm @@ -68,11 +68,6 @@ sub _new { } => $class; } -## accessors - -#sub associated_attribute { (shift)->{'attribute'} } -#sub accessor_type { (shift)->{'accessor_type'} } - ## factory diff --git a/lib/Class/MOP/Method/Constructor.pm b/lib/Class/MOP/Method/Constructor.pm index 71ecef0..4dedd49 100644 --- a/lib/Class/MOP/Method/Constructor.pm +++ b/lib/Class/MOP/Method/Constructor.pm @@ -65,11 +65,6 @@ sub _new { }, $class; } -## accessors - -#sub options { (shift)->{'options'} } -#sub associated_metaclass { (shift)->{'associated_metaclass'} } - ## cached values ... sub meta_instance { diff --git a/lib/Class/MOP/Method/Generated.pm b/lib/Class/MOP/Method/Generated.pm index d8614c9..a1f0d38 100644 --- a/lib/Class/MOP/Method/Generated.pm +++ b/lib/Class/MOP/Method/Generated.pm @@ -14,15 +14,10 @@ use base 'Class::MOP::Method'; 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"; } diff --git a/lib/Class/MOP/Method/Inlined.pm b/lib/Class/MOP/Method/Inlined.pm index 3621a8a..b029440 100644 --- a/lib/Class/MOP/Method/Inlined.pm +++ b/lib/Class/MOP/Method/Inlined.pm @@ -12,8 +12,6 @@ our $AUTHORITY = 'cpan:STEVAN'; use base 'Class::MOP::Method::Generated'; -#sub _expected_method_class { $_[0]{_expected_method_class} } - sub _uninlined_body { my $self = shift; diff --git a/lib/Class/MOP/Package.pm b/lib/Class/MOP/Package.pm index 2a32066..a2f1c80 100644 --- a/lib/Class/MOP/Package.pm +++ b/lib/Class/MOP/Package.pm @@ -103,11 +103,6 @@ sub namespace { \%{$_[0]->{'package'} . '::'} } -#sub method_metaclass { $_[0]->{'method_metaclass'} } -#sub wrapped_method_metaclass { $_[0]->{'wrapped_method_metaclass'} } - -#sub _method_map { $_[0]->{'methods'} } - # utility methods {