From 07b1b67e420fada581137e02f957fac2d11f5047 Mon Sep 17 00:00:00 2001 From: Lukas Mai Date: Wed, 13 Nov 2024 21:53:39 +0100 Subject: [PATCH] fix precedence error in SQL::Translator::Schema::Trigger `!$x eq $y` parses as `(!$x) ne $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'); }