3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-30 07:59:42 +01:00

Move lc out of loop (does Perl already optimize for this?)

This commit is contained in:
Pragmatic Software 2017-12-02 15:05:30 -08:00
parent 3ab8f44a8a
commit 8ac79a4cb2

View File

@ -80,8 +80,9 @@ sub exists {
my $self = shift;
my ($keyword) = @_;
$keyword = lc $keyword;
foreach my $ref (@{ $self->{handlers} }) {
return 1 if $ref->{name} eq lc $keyword;
return 1 if $ref->{name} eq $keyword;
}
return 0;
}