Skip to content

Commit

Permalink
Consolidate code
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Nov 20, 2019
1 parent e721d32 commit 707d899
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Class/Simple/Readonly/Cached.pm
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ sub AUTOLOAD {
return $rc;
}
}
$self->{_misses}{$key}++;
if(wantarray) {
my @rc = $object->$func(@_);
$self->{_misses}{$key}++;
if(scalar(@rc) == 0) {
return;
}
Expand All @@ -192,7 +192,6 @@ sub AUTOLOAD {
}
return @rc;
}
$self->{_misses}{$key}++;
$rc = $object->$func(@_);
if(!defined($rc)) {
if(ref($cache) eq 'HASH') {
Expand Down

0 comments on commit 707d899

Please sign in to comment.