Skip to content

Commit

Permalink
small optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 14, 2013
1 parent ca94c9c commit ea6fe49
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/Mojo/Loader.pm
Expand Up @@ -8,15 +8,9 @@ use Mojo::Util qw(b64_decode class_to_path);

my (%BIN, %CACHE);

sub data {
my ($self, $class, $name) = @_;
return $class ? $name ? _all($class)->{$name} : _all($class) : undef;
}
sub data { $_[1] ? $_[2] ? _all($_[1])->{$_[2]} : _all($_[1]) : undef }

sub is_binary {
my ($self, $class, $name) = @_;
return keys %{_all($class)} ? !!$BIN{$class}{$name} : undef;
}
sub is_binary { keys %{_all($_[1])} ? !!$BIN{$_[1]}{$_[2]} : undef }

sub load {
my ($self, $module) = @_;
Expand Down

0 comments on commit ea6fe49

Please sign in to comment.