#dont overwrite existing methods
if($reader eq $writer){
- my %opts = ( $meta->has_method($reader) ? () : (accessor => $reader) );
+ my %opts = ( $meta->has_method($reader) ? ( is => 'bare' ) : (accessor => $reader) );
my $attr = $meta->find_attribute_by_name($attr_name) || $meta->add_attribute($attr_name, %opts,
traits => ['MooseX::Emulate::Class::Accessor::Fast::Meta::Role::Attribute']
);
$meta->remove_attribute($attr_name)
if $meta->find_attribute_by_name($attr_name);
my $reader = $self->accessor_name_for($attr_name);
- my @opts = ($meta->has_method($reader) ? () : (reader => $reader) );
+ my @opts = ($meta->has_method($reader) ? (is => 'bare') : (reader => $reader) );
my $attr = $meta->add_attribute($attr_name, @opts,
traits => ['MooseX::Emulate::Class::Accessor::Fast::Meta::Role::Attribute']
) if scalar(@opts);
my($class, $field) = @_;
my $meta = $locate_metaclass->($class);
my $attr = $meta->find_attribute_by_name($field) || $meta->add_attribute($field,
- traits => ['MooseX::Emulate::Class::Accessor::Fast::Meta::Role::Attribute']
+ traits => ['MooseX::Emulate::Class::Accessor::Fast::Meta::Role::Attribute'],
+ is => 'bare',
);
my $reader = $attr->get_read_method_ref;
my $writer = $attr->get_write_method_ref;
my($class, $field) = @_;
my $meta = $locate_metaclass->($class);
my $attr = $meta->find_attribute_by_name($field) || $meta->add_attribute($field,
- traits => ['MooseX::Emulate::Class::Accessor::Fast::Meta::Role::Attribute']
+ traits => ['MooseX::Emulate::Class::Accessor::Fast::Meta::Role::Attribute'],
+ is => 'bare',
);
return $attr->get_read_method_ref;
}
my($class, $field) = @_;
my $meta = $locate_metaclass->($class);
my $attr = $meta->find_attribute_by_name($field) || $meta->add_attribute($field,
- traits => ['MooseX::Emulate::Class::Accessor::Fast::Meta::Role::Attribute']
+ traits => ['MooseX::Emulate::Class::Accessor::Fast::Meta::Role::Attribute'],
+ is => 'bare',
);
return $attr->get_write_method_ref;
}