mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
Move lc out of loop (does Perl already optimize for this?)
This commit is contained in:
parent
3ab8f44a8a
commit
8ac79a4cb2
@ -80,8 +80,9 @@ sub exists {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
my ($keyword) = @_;
|
my ($keyword) = @_;
|
||||||
|
|
||||||
|
$keyword = lc $keyword;
|
||||||
foreach my $ref (@{ $self->{handlers} }) {
|
foreach my $ref (@{ $self->{handlers} }) {
|
||||||
return 1 if $ref->{name} eq lc $keyword;
|
return 1 if $ref->{name} eq $keyword;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user