| 1 | package UID2::Client::Key; | ||||||||||||||||||||
| 2 | 4 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 4 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | use Class::Accessor::Lite ( | ||||||||||||||||||||
| 6 | 4 | new => 1, | |||||||||||||||||||
| 7 | ro => [qw(id site_id created activates expires secret)], | ||||||||||||||||||||
| 8 | 4 | ▶ | ); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | 4 | ▶ | use UID2::Client::Timestamp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | sub is_active { | ||||||||||||||||||||
| 12 | 35 | ▶ | my ($self, $now) = @_; | ||||||||||||||||||
|
Subroutine
is_active: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||||||||||||
| 13 | 35 | ▶ | $now //= UID2::Client::Timestamp->now; | ||||||||||||||||||
|
Condition66%2/3
$now //= "UID2::Client::Timestamp"->now
MC/DC0%0/2
$now //= "UID2::Client::Timestamp"->now
$now
"UID2::Client::Timestamp"->now
Truth table66%2/3
A //= B
A= $nowB= "UID2::Client::Timestamp"->now
| |||||||||||||||||||||
| 14 | 35 | ▶ | $self->activates <= $now->get_epoch_second && $now->get_epoch_second < $self->expires; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 15 | } | ||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 4 | 1; | |||||||||||||||||||
| 18 | __END__ | ||||||||||||||||||||