use strict;
use warnings;
-our $VERSION = '1.14';
+our $VERSION = '1.25';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
sub _generate_accessor_method_inline {
my $self = $_[0];
- my $attr = $self->associated_attribute;
my $inv = '$_[0]';
my $value_name = $self->_value_needs_copy ? '$val' : '$_[1]';
sub _generate_writer_method_inline {
my $self = $_[0];
- my $attr = $self->associated_attribute;
my $inv = '$_[0]';
- my $slot_access = $self->_inline_get($inv);
my $value_name = $self->_value_needs_copy ? '$val' : '$_[1]';
$self->_eval_code('sub { '
sub _generate_reader_method_inline {
my $self = $_[0];
- my $attr = $self->associated_attribute;
my $inv = '$_[0]';
my $slot_access = $self->_inline_get($inv);
';'. "\n }";
}
$code .= $self->_inline_check_coercion('$default') . "\n";
- $code .= $self->_inline_check_constraint('$default') . "\n";
+ $code .= $self->_inline_check_constraint('$default', 'lazy') . "\n";
$code .= ' ' . $self->_inline_init_slot($attr, $instance, '$default') . "\n";
}
else {
sub _inline_store {
my ( $self, $instance, $value ) = @_;
- return $self->associated_attribute->inline_store( $instance, $value );
+ return $self->associated_attribute->inline_set( $instance, $value );
}
sub _inline_get_old_value_for_trigger {
return $self->associated_attribute->inline_get($instance);
}
-sub _inline_access {
- my ($self, $instance) = @_;
-
- return $self->associated_attribute->inline_access($instance);
-}
-
sub _inline_has {
my ($self, $instance) = @_;