Merge branch 'topic/unified-method-generation-w-xs' of gitmo@moose.perl.org:Class...
gfx [Mon, 31 Aug 2009 07:46:59 +0000 (16:46 +0900)]
Conflicts:
lib/Class/MOP/Class.pm
lib/Class/MOP/Instance.pm
lib/Class/MOP/Method/Accessor.pm
lib/Class/MOP/Method/Constructor.pm
xs/Class.xs
xs/MOP.xs

1  2 
lib/Class/MOP/Class.pm
lib/Class/MOP/Method/Accessor.pm
lib/Class/MOP/Method/Constructor.pm

Simple merge
@@@ -98,67 -104,73 +98,130 @@@ sub _generate_accessor_method 
      }
  
      return $self->_generate_accessor_method_basic();
++<<<<<<< HEAD:lib/Class/MOP/Method/Accessor.pm
+ }
+ sub _generate_reader_method {
+     my ($self) = @_;
+     if(my $xs = $self->associated_metaclass->instance_metaclass->can_xs()){
+         return $self->_generate_reader_method_xs($xs);
+     }
+     if($self->is_inline){
+         return $self->_generate_reader_method_inline();
+     }
+     return $self->_generate_reader_method_basic();
+ }
+ sub _generate_writer_method {
+     my ($self) = @_;
+     if(my $xs = $self->associated_metaclass->instance_metaclass->can_xs()){
+         return $self->_generate_writer_method_xs($xs);
+     }
+     if($self->is_inline){
+         return $self->_generate_writer_method_inline();
+     }
+     return $self->_generate_writer_method_basic();
+ }
+ sub _generate_clearer_method {
+     my ($self) = @_;
+     if(my $xs = $self->associated_metaclass->instance_metaclass->can_xs()){
+         return $self->_generate_clearer_method_xs($xs);
+     }
+     if($self->is_inline){
+         return $self->_generate_clearer_method_inline();
+     }
+     return $self->_generate_clearer_method_basic();
+ }
+ sub _generate_predicate_method {
+     my ($self) = @_;
+     if(my $xs = $self->associated_metaclass->instance_metaclass->can_xs()){
+         return $self->_generate_predicate_method_xs($xs);
+     }
+     if($self->is_inline){
+         return $self->_generate_predicate_method_inline();
+     }
+     return $self->_generate_predicate_method_basic();
+ }
+ ## basic generators
 -sub generate_accessor_method {
 -    Carp::cluck('The generate_accessor_method method has been made private.'
 -        . " The public version is deprecated and will be removed in a future release.\n");
 -    shift->_generate_accessor_method_basic;
++=======
 +}
 +
 +sub _generate_reader_method {
 +    my ($self) = @_;
 +
 +    if(my $xs = $self->associated_metaclass->instance_metaclass->can_xs()){
 +        return $self->_generate_reader_method_xs($xs);
 +    }
 +
 +    if($self->is_inline){
 +        return $self->_generate_reader_method_inline();
 +    }
 +
 +    return $self->_generate_reader_method_basic();
 +}
 +
 +sub _generate_writer_method {
 +    my ($self) = @_;
 +
 +    if(my $xs = $self->associated_metaclass->instance_metaclass->can_xs()){
 +        return $self->_generate_writer_method_xs($xs);
 +    }
 +
 +    if($self->is_inline){
 +        return $self->_generate_writer_method_inline();
 +    }
 +
 +    return $self->_generate_writer_method_basic();
  }
  
 +sub _generate_clearer_method {
 +    my ($self) = @_;
 +
 +    if(my $xs = $self->associated_metaclass->instance_metaclass->can_xs()){
 +        return $self->_generate_clearer_method_xs($xs);
 +    }
 +
 +    if($self->is_inline){
 +        return $self->_generate_clearer_method_inline();
 +    }
 +
 +    return $self->_generate_clearer_method_basic();
 +}
 +
 +sub _generate_predicate_method {
 +    my ($self) = @_;
 +
 +    if(my $xs = $self->associated_metaclass->instance_metaclass->can_xs()){
 +        return $self->_generate_predicate_method_xs($xs);
 +    }
 +
 +    if($self->is_inline){
 +        return $self->_generate_predicate_method_inline();
 +    }
 +
 +    return $self->_generate_predicate_method_basic();
 +}
 +
 +
 +## basic generators
 +
  sub _generate_accessor_method_basic {
      my $attr = (shift)->associated_attribute;
      return sub {
@@@ -85,6 -104,13 +85,7 @@@ sub _initialize_body 
      $self->{'body'} = $self->_generate_constructor_method();
  }
  
 -sub generate_constructor_method {
 -    Carp::cluck('The generate_constructor_method method has been made private.'
 -        . " The public version is deprecated and will be removed in a future release.\n");
 -    shift->_generate_constructor_method;
 -}
 -
  sub _generate_constructor_method {
      my ($self) = @_;