Skip to content

Commit

Permalink
there is no need to use fileparse
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jan 2, 2017
1 parent 6f233e1 commit 81fb4f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Mojo/Loader.pm
Expand Up @@ -2,7 +2,7 @@ package Mojo::Loader;
use Mojo::Base -strict;

use Exporter 'import';
use File::Basename 'fileparse';
use File::Basename 'basename';
use File::Spec::Functions qw(catdir catfile splitdir);
use Mojo::Exception;
use Mojo::Util qw(b64_decode class_to_path);
Expand All @@ -27,7 +27,7 @@ sub find_modules {
opendir(my $dir, $path);
for my $file (grep /\.pm$/, readdir $dir) {
next if -d catfile splitdir($path), $file;
$modules{"${ns}::" . fileparse $file, qr/\.pm/}++;
$modules{"${ns}::" . basename $file, '.pm'}++;
}
}

Expand Down

0 comments on commit 81fb4f9

Please sign in to comment.