Skip to content

Commit

Permalink
small optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 15, 2013
1 parent 48aca03 commit 387d6ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

4.38 2013-09-15
4.38 2013-09-16
- Added is_binary method to Mojo::Loader.
- Fixed support for binary files in inflate command.
- Fixed stylesheet helper not to enforce a media attribute.
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojo/Loader.pm
Expand Up @@ -22,8 +22,7 @@ sub load {
return undef if $module->can('new') || eval "require $module; 1";

# Exists
my $path = class_to_path $module;
return 1 if $@ =~ /^Can't locate $path in \@INC/;
return 1 if $@ =~ /^Can't locate \Q@{[class_to_path $module]}\E in \@INC/;

# Real error
return Mojo::Exception->new($@);
Expand Down

0 comments on commit 387d6ec

Please sign in to comment.