File Coverage

blib/lib/Serengeti/Session.pm
Criterion Covered Total %
statement 15 17 88.2
branch 1 2 50.0
condition n/a
subroutine 5 5 100.0
pod 0 1 0.0
total 21 25 84.0


line stmt bran cond sub pod time code
1             package Serengeti::Session;
2              
3 1     1   544 use strict;
  1         2  
  1         30  
4 1     1   5 use warnings;
  1         2  
  1         24  
5              
6 1     1   512 use Serengeti::Session::Persistent;
  1         3  
  1         42  
7              
8 1     1   987 use accessors::ro qw(stash);
  1         465  
  1         6  
9              
10             sub new {
11 1     1 0 16 my ($pkg, $args) = @_;
12            
13 1 50       7 if (exists $args->{name}) {
14 1         12 return Serengeti::Session::Persistent->new($args);
15             }
16              
17 0           my $self = bless { stash => {}, }, $pkg;
18              
19 0           return $self;
20             }
21              
22             1;