blib/lib/Sentry/Cache.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 19 | 19 | 100.0 |
branch | n/a | ||
condition | 2 | 3 | 66.6 |
subroutine | 4 | 4 | 100.0 |
pod | 0 | 3 | 0.0 |
total | 25 | 29 | 86.2 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | use Mojo::Base -base, -signatures; | ||||||
2 | 5 | 5 | 167510 | ||||
5 | 16 | ||||||
5 | 28 | ||||||
3 | has _cache => sub { {} }; | ||||||
4 | |||||||
5 | my $Instance; | ||||||
6 | |||||||
7 | $Instance //= $package->new; | ||||||
8 | 2 | 2 | 0 | 953 | return $Instance; | ||
2 | 4 | ||||||
2 | 2 | ||||||
9 | 2 | 66 | 7 | } | |||
10 | 2 | 13 | |||||
11 | $self->_cache->{$key} = $value; | ||||||
12 | } | ||||||
13 | 3 | 3 | 0 | 2243 | |||
3 | 5 | ||||||
3 | 3 | ||||||
3 | 5 | ||||||
3 | 4 | ||||||
14 | 3 | 6 | return $self->_cache->{$key}; | ||||
15 | } | ||||||
16 | |||||||
17 | 3 | 3 | 0 | 484 | 1; | ||
3 | 4 | ||||||
3 | 4 | ||||||
3 | 4 |