blib/lib/auto/share/dist/Cmd-Dwarf/app/lib/Dwarf/Session.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 45 CC 5 SCAR 22.3
CC
5
Cov
0%
flush
20.0
param
6.0
id
2.0
CRAP 9.3
1 package Dwarf::Session;
2 use Dwarf::Pragma;
3 use parent 'HTTP::Session';
4  
5 sub param {
6 my $self = shift;
7 if (@_ > 1) {
8 $self->set(@_);
9 }
10 return $self->get($_[0]);
11 }
12  
13 sub id { shift->session_id(@_) }
14 sub dataref { shift->as_hashref(@_) }
15 sub refresh { shift->regenerate_session_id(@_) }
16  
17 sub flush {
18 my ($self, ) = @_;
19  
20 if ($self->is_fresh) {
21 if ($self->is_changed || !$self->save_modified_session_only) {
22 $self->store->insert( $self->session_id, $self->_data );
23 $self->is_fresh(0);
24 }
25 } else {
26 if ($self->is_changed) {
27 $self->store->update( $self->session_id, $self->_data );
28 }
29 }
30 }
31  
32 1;