Skip to content

Commit

Permalink
no need for a method call
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Oct 5, 2017
1 parent 9c5f215 commit bc1ba83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Mojolicious/Static.pm
Expand Up @@ -45,7 +45,7 @@ sub file {
# Search all paths
my @parts = map { encode 'UTF-8', $_ } split '/', $rel;
for my $path (@{$self->paths}) {
next unless my $asset = $self->_get_file(path($path, @parts)->to_string);
next unless my $asset = _get_file(path($path, @parts)->to_string);
return $asset;
}

Expand All @@ -54,7 +54,7 @@ sub file {

# Search extra files
my $extra = $self->extra;
return exists $extra->{$rel} ? $self->_get_file($extra->{$rel}) : undef;
return exists $extra->{$rel} ? _get_file($extra->{$rel}) : undef;
}

sub is_fresh {
Expand Down Expand Up @@ -143,7 +143,7 @@ sub _get_data_file {
}

sub _get_file {
my ($self, $path) = @_;
my $path = shift;
no warnings 'newline';
return -f $path && -r _ ? Mojo::Asset::File->new(path => $path) : undef;
}
Expand Down

0 comments on commit bc1ba83

Please sign in to comment.