From a80a423be6d970e25bf2acbd3afc0cbfb3ba10ec Mon Sep 17 00:00:00 2001 From: mauke Date: Thu, 14 Nov 2024 08:45:58 +0100 Subject: [PATCH] fix precedence error in SQL::Translator::Schema::Trigger (#177) `!$x eq $y` parses as `(!$x) eq $y`, not `!($x eq $y)`. Just use `ne` to check for inequality directly. Fixes #175. --- lib/SQL/Translator/Schema/Trigger.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SQL/Translator/Schema/Trigger.pm b/lib/SQL/Translator/Schema/Trigger.pm index bf7e0e73..03160ee6 100644 --- a/lib/SQL/Translator/Schema/Trigger.pm +++ b/lib/SQL/Translator/Schema/Trigger.pm @@ -356,7 +356,7 @@ around equals => sub { return $self->error('Names not equal'); } - if (!$self->perform_action_when eq $other->perform_action_when) { + if ($self->perform_action_when ne $other->perform_action_when) { return $self->error('perform_action_when differs'); }