GrowthBook/CacheEntry.pm

filter: Statementstmt 100% 33 / 33 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 3 totaltotal 93.0% 40 / 43 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« GrowthBook/FeatureRule.pm ↑ Summary
1 package WebService::GrowthBook::CacheEntry;
2 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 8 ▶no indirect;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 8 ▶use Object::Pad;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 8 our $VERSION = '0.003'; ## VERSION
8  
9 class WebService::GrowthBook::CacheEntry {
10 3 ▶ field $value :param :reader;
Subroutine value: called CC=1 SCAR=0.0
Pod undocumented
11 8 field $ttl :param;
12 8 field $expires; # = time() + $ttl;
13 ADJUST {
14 $expires = time() + $ttl;
15 }
16 1 ▶ method update($new_value){
Subroutine update: called CC=1 SCAR=0.0
Pod undocumented
17 1 $value = $new_value;
18 1 $expires = time() + $ttl;
19 8 }
20 4 ▶ method expired(){
Subroutine expired: called CC=1 SCAR=0.0
Pod undocumented
21 4 return $expires < time();
22 8 }
23 }
24 8 1;
« GrowthBook/FeatureRule.pm ↑ Summary