From d6a8541b5c84daf5f844a47077974d1d7f3453f8 Mon Sep 17 00:00:00 2001 From: Maarten Vanraes Date: Sun, 24 Apr 2016 21:21:28 +0200 Subject: Action role need a string comparison --- lib/ManaTools/Shared/ActionsRole.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/ManaTools') diff --git a/lib/ManaTools/Shared/ActionsRole.pm b/lib/ManaTools/Shared/ActionsRole.pm index 888750b3..e4c69c69 100644 --- a/lib/ManaTools/Shared/ActionsRole.pm +++ b/lib/ManaTools/Shared/ActionsRole.pm @@ -118,7 +118,7 @@ sub act { my $key = shift; my $acts = $self->acts(); for my $action (@{$self->acts()}) { - if ($key == $action->name()) { + if ($key eq $action->name()) { return $action->act($self, @_); } } @@ -179,7 +179,7 @@ sub remove_action { my $index = scalar(@{$acts}); while ($index > 0) { $index = $index - 1; - if ($acts->[$index]->name() == $key) { + if ($acts->[$index]->name() eq $key) { delete $acts->[$index]; } } -- cgit v1.2.1