From d97ee5f57c395eddf9cd052d8b0239756ac7b62b Mon Sep 17 00:00:00 2001 From: Lucas Gabriel Vuotto Date: Sun, 4 May 2025 10:02:23 +0000 Subject: [PATCH] api/v0: replace one "if !" with "unless" for readability --- lib/Pooru/API/V0/Model/Tags.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Pooru/API/V0/Model/Tags.pm b/lib/Pooru/API/V0/Model/Tags.pm index c02b19c..f5bbfdb 100644 --- a/lib/Pooru/API/V0/Model/Tags.pm +++ b/lib/Pooru/API/V0/Model/Tags.pm @@ -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}->@*);