my $potential_value = $self->_potential_value($slot_access);
+ if ( $self->_return_value($slot_access) ) {
+ # some writers will save the return value in this variable when they
+ # generate the potential value.
+ $code .= "\n" . 'my @return;';
+ }
+
$code .= "\n" . $self->_inline_copy_native_value( \$potential_value );
$code .= "\n"
. $self->_inline_tc_code(
return $self->_inline_store(@_);
}
-sub _return_value { return q{} }
+sub _return_value {
+ my ( $self, $slot_access ) = @_;
+
+ return $slot_access;
+}
no Moose::Role;