Set the value without going through the accessor. Note that this may be done to
even attributes with just read only accessors.
+=item B<set_initial_value ($instance, $value)>
+
+This method sets the value without going through the accessor -- but it is only
+called when the instance data is first initialized.
+
=item B<get_value ($instance)>
Return the value without going through the accessor. Note that this may be done
};
# most things will just want to set a value, so make it first arg
- $instance->$initializer($value, $slot_name, $callback);
+ $instance->$initializer($value, $callback, $self);
}
sub initialize_slot {
reader => 'get_bar',
writer => 'set_bar',
initializer => sub {
- my ($self, $value, $name, $callback) = @_;
+ my ($self, $value, $callback, $attr) = @_;
$callback->($value * 2);
},
);