@_ > 0 or $self->throw_exception(
"{$set_meth} needs a list of objects or hashrefs"
);
- my @to_set = (ref($_[0] eq 'ARRAY') ? @{ $_[0] } : @_);
+ my @to_set = (ref($_[0]) eq 'ARRAY' ? @{ $_[0] } : @_);
$self->search_related($rel, {})->delete;
- $self->$add_meth(shift) for (@to_set);
+ $self->$add_meth($_) for (@to_set);
};
*{"${class}::${remove_meth}"} = sub {