Session/Role/Memory.pm

filter: Statementstmt 100% 18 / 18 Branchbran n/a Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 92.3% 24 / 26 CC 2 SCAR 2.9
CC
2
Cov
95%
_build__jedi_session
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Session/Backend/Memory.pm ↑ Summary Session.pm »
1 #
2 # This file is part of Jedi-Plugin-Session
3 #
4 # This software is copyright (c) 2013 by celogeek <me@celogeek.com>.
5 #
6 # This is free software; you can redistribute it and/or modify it under
7 # the same terms as the Perl 5 programming language system itself.
8 #
9 package Jedi::Plugin::Session::Role::Memory;
10  
11 # ABSTRACT: Memory Backend
12  
13 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 2 our $VERSION = '0.05'; # VERSION
16 2 ▶use Jedi::Plugin::Session::Backend::Memory;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 2 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 2 ▶sub _build__jedi_session {
Subroutine _build__jedi_session: called CC=2 SCAR=7.0
21 2 my ($self) = @_;
22 2 my $class = ref $self;
23 my $expires_in = $self->jedi_config->{$class}{session}{expiration}
24 2 ▶ // '3 hours';
Condition50%1/2
$self->jedi_config->{$class}{"session"}{"expiration"} // "3 hours"
l!l
20
MC/DC0%0/1
$self->jedi_config->{$class}{"session"}{"expiration"} // "3 hours"
$self->jedi_config->{$class}{"session"}{"expiration"}
Truth table50%1/2
A
A= $self->jedi_config->{$class}{"session"}{"expiration"}
Aresult
11
00
25 2 return Jedi::Plugin::Session::Backend::Memory->new(
26 expires_in => $expires_in );
27 }
28  
29 2 1;
30  
31 __END__
« Session/Backend/Memory.pm ↑ Summary Session.pm »