requires 'Scalar::Util' => '1.19';
requires 'Carp';
-requires 'Class::MOP' => '0.77';
+requires 'Class::MOP' => '0.78';
requires 'List::MoreUtils' => '0.12';
requires 'Sub::Exporter' => '0.972';
requires 'Task::Weaken' => '0';
my $attr = $self->associated_attribute;
my $mi = $attr->associated_class->get_meta_instance;
- my $slot_name = sprintf "'%s'", $attr->slots;
- my $code = $mi->inline_set_slot_value($instance, $slot_name, $value) . ";";
- $code .= $mi->inline_weaken_slot_value($instance, $slot_name, $value) . ";"
+ my $code = $mi->inline_set_slot_value($instance, $attr->slots, $value) . ";";
+ $code .= $mi->inline_weaken_slot_value($instance, $attr->slots, $value) . ";"
if $attr->is_weak_ref;
return $code;
}
my $attr = $self->associated_attribute;
my $mi = $attr->associated_class->get_meta_instance;
- my $slot_name = sprintf "'%s'", $attr->slots;
- return $mi->inline_get_slot_value($instance, $slot_name);
+ return $mi->inline_get_slot_value($instance, $attr->slots);
}
sub _inline_access {
my $attr = $self->associated_attribute;
my $mi = $attr->associated_class->get_meta_instance;
- my $slot_name = sprintf "'%s'", $attr->slots;
- return $mi->inline_slot_access($instance, $slot_name);
+ return $mi->inline_slot_access($instance, $attr->slots);
}
sub _inline_has {
my $attr = $self->associated_attribute;
my $mi = $attr->associated_class->get_meta_instance;
- my $slot_name = sprintf "'%s'", $attr->slots;
- return $mi->inline_is_slot_initialized($instance, $slot_name);
+ return $mi->inline_is_slot_initialized($instance, $attr->slots);
}
sub _inline_auto_deref {
. '$instance, '
. $self->meta_instance->inline_get_slot_value(
'$instance',
- ("'" . $attr->name . "'")
+ $attr->name,
)
. ', '
. '$attrs->[' . $i . ']'
$source = (
$self->meta_instance->inline_set_slot_value(
'$instance',
- ("'" . $attr->name . "'"),
+ $attr->name,
$value
) . ';'
);
"\n" .
$self->meta_instance->inline_weaken_slot_value(
'$instance',
- ("'" . $attr->name . "'")
+ $attr->name
) .
' if ref ' . $value . ';'
);