Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
match hidden methods a little faster
  • Loading branch information
kraih committed Jun 3, 2016
1 parent 8c68d3f commit a57a077
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojolicious/Routes.pm
Expand Up @@ -50,7 +50,7 @@ sub hide { push @{shift->hidden}, @_ }
sub is_hidden {
my ($self, $method) = @_;
my $h = $self->{hiding} ||= {map { $_ => 1 } @{$self->hidden}};
return !!($h->{$method} || index($method, '_') == 0 || $method !~ /[a-z]/);
return !!($h->{$method} || $method =~ /^_/ || $method =~ /^[A-Z_]+$/);
}

sub lookup { ($_[0]{reverse} //= $_[0]->_index)->{$_[1]} }
Expand Down

0 comments on commit a57a077

Please sign in to comment.