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 | 179250 | ||||
5 | 19 | ||||||
5 | 31 | ||||||
3 | has _cache => sub { {} }; | ||||||
4 | |||||||
5 | my $Instance; | ||||||
6 | |||||||
7 | $Instance //= $package->new; | ||||||
8 | 2 | 2 | 0 | 918 | return $Instance; | ||
2 | 3 | ||||||
2 | 3 | ||||||
9 | 2 | 66 | 8 | } | |||
10 | 2 | 13 | |||||
11 | $self->_cache->{$key} = $value; | ||||||
12 | } | ||||||
13 | 3 | 3 | 0 | 2509 | |||
3 | 5 | ||||||
3 | 4 | ||||||
3 | 4 | ||||||
3 | 4 | ||||||
14 | 3 | 10 | return $self->_cache->{$key}; | ||||
15 | } | ||||||
16 | |||||||
17 | 3 | 3 | 0 | 511 | 1; | ||
3 | 4 | ||||||
3 | 5 | ||||||
3 | 2 |