Bug 33745: (QA follow-up) Tidy

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Marcel de Rooy 2023-07-14 09:29:59 +00:00 committed by Tomas Cohen Arazi
parent abc14dbaf2
commit ca0d91aed4
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 5 additions and 4 deletions

View File

@ -907,19 +907,20 @@ sub AUTOLOAD {
my @columns = @{$self->_columns()};
if ( grep { $_ eq $method } @columns ) {
# Lazy definition of get/set accessors like $item->barcode; note that it contains $method
my $accessor = sub {
my $self = shift;
if ( @_ ) {
$self->_result()->set_column( $method, @_);
if (@_) {
$self->_result()->set_column( $method, @_ );
return $self;
} else {
return $self->_result()->get_column( $method );
return $self->_result()->get_column($method);
}
};
no strict 'refs';
*{$AUTOLOAD} = $accessor;
return $accessor->($self, @_);
return $accessor->( $self, @_ );
}
my @known_methods = qw( is_changed id in_storage get_column discard_changes make_column_dirty );