my $tm_attr = $tm->meta->find_attribute_by_name($name);
next unless ref $tm_attr;
my $tm_reader = $tm_attr->get_read_method;
- $self->$writer($tm->$tm_reader);
+ $self->$writer($tm->$tm_reader) if defined($tm->$tm_reader);
}
};
implements _check_single_valid => as {
my ($self, $valid, $value) = @_;
+ return undef unless defined($value);
if (ref $valid eq 'ARRAY') {
return $value if grep { $_ eq $value } @$valid;
} else {
has location => (isa => 'Str', is => 'rw', required => 1);
has layout => (isa => 'Str', is => 'rw', lazy_build => 1);
+ has layout_args => (isa => 'HashRef', is => 'ro', default => sub { {} });
has outer => (isa => 'Reaction::UI::ViewPort', is => 'rw', weak_ref => 1);
has inner => (isa => 'Reaction::UI::ViewPort', is => 'rw');
has focus_stack => (
# the model and DBIC can have nullable fields and DBIC doesn't
# have a way to tell us that doesn't force value inflation (extra
# SELECTs for belongs_to) so basically we're screwed.
- return ($self->_model_has_value && defined($self->value)
+ return ($self->_model_has_value && defined($self->_build_value)
? $self->_value_string_from_value
: $self->_empty_string_value);
};