api/v0: replace one "if !" with "unless" for readability
This commit is contained in:
parent
05c8d5e493
commit
d97ee5f57c
1 changed files with 2 additions and 2 deletions
|
@ -31,8 +31,8 @@ sub random_id ($self)
|
|||
|
||||
sub get ($self, %search)
|
||||
{
|
||||
croak "Exactly one of 'id' or 'display' must be defined" if
|
||||
!(defined($search{id}) ^^ defined($search{display}));
|
||||
croak "Exactly one of 'id' or 'display' must be defined" unless
|
||||
defined($search{id}) ^^ defined($search{display});
|
||||
|
||||
my $key = defined($search{id}) ? "id" : "display";
|
||||
my $where_clause = where_in($key, $search{$key}->@*);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue