blib/lib/Langertha/Knarr/Session.pm

filter: Statementstmt 95.2% 20 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod 100% 1 / 1 totaltotal 93.3% 28 / 30 CC 1 SCAR 1.2
CC
1
Cov
95%
touch
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« blib/lib/Langertha/Knarr/Handler.pm ↑ Summary blib/lib/Langertha/Knarr/Authorizer/StaticKey.pm »
1 package Langertha::Knarr::Session;
2 # ABSTRACT: Per-conversation state for a Knarr server
3 73 our $VERSION = '1.103';
4 73 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 73 ▶use Time::HiRes qw( time );
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7  
8 73 has id => (
9 is => 'ro',
10 isa => 'Str',
11 required => 1,
12 );
13  
14 has messages => (
15 is => 'rw',
16 isa => 'ArrayRef',
17 34 ▶ default => sub { [] },
Subroutine __ANON__: called CC=1 SCAR=0.0
18 73 );
19  
20 has metadata => (
21 is => 'rw',
22 isa => 'HashRef',
23 34 ▶ default => sub { {} },
Subroutine __ANON__: called CC=1 SCAR=0.0
24 73 );
25  
26 has handler_state => (
27 is => 'rw',
28 isa => 'HashRef',
29 34 ▶ default => sub { {} },
Subroutine __ANON__: called CC=1 SCAR=0.0
30 73 );
31  
32 has created_at => (
33 is => 'ro',
34 isa => 'Num',
35 34 ▶ default => sub { time() },
Subroutine __ANON__: called CC=1 SCAR=0.0
36 73 );
37  
38 has last_active => (
39 is => 'rw',
40 isa => 'Num',
41 34 ▶ default => sub { time() },
Subroutine __ANON__: called CC=1 SCAR=0.0
42 73 );
43  
44 0 ▶sub touch { $_[0]->last_active( time() ) }
Subroutine touch: not called CC=1 SCAR=6.9
Pod documented
45  
46 73 __PACKAGE__->meta->make_immutable;
47 73 1;
48  
49 __END__
« blib/lib/Langertha/Knarr/Handler.pm ↑ Summary blib/lib/Langertha/Knarr/Authorizer/StaticKey.pm »