Skip to content

Commit

Permalink
Small speedup on hits
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Nov 20, 2019
1 parent 707d899 commit c86f490
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Class/Simple/Readonly/Cached.pm
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ sub AUTOLOAD {

# my $func = $self->{'object'} . "::$param";
my $func = $param;
my $object = $self->{'object'};

# if($param =~ /^[gs]et_/) {
# # $param = "SUPER::$param";
Expand Down Expand Up @@ -180,6 +179,7 @@ sub AUTOLOAD {
}
}
$self->{_misses}{$key}++;
my $object = $self->{'object'};
if(wantarray) {
my @rc = $object->$func(@_);
if(scalar(@rc) == 0) {
Expand Down

0 comments on commit c86f490

Please sign in to comment.