WebApp/Segment/Session/Saver.pm

filter: Statementstmt 100% 18 / 18 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 100% 27 / 27 CC 2 SCAR 2.9
CC
2
Cov
100%
session
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« WebApp/Segment/Decline.pm ↑ Summary WebApp/Segment/Decline/SessionInStore.pm »
1 =head1 NAME
2  
3 OpenFrame::WebApp::Segment::Session::Saver - pipeline segment to save sessions
4  
5 =head1 SYNOPSIS
6  
7 # installed automatically in cleanup pipeline
8 # by OpenFrame::WebApp::Segment::Session::Loader
9  
10 =cut
11  
12 package OpenFrame::WebApp::Segment::Session::Saver;
13  
14 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 2 ▶use warnings::register;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 2 our $VERSION = (split(/ /, '$Revision: 1.2 $'))[1];
18  
19 2 ▶use base qw( Pipeline::Segment );
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 2 ▶sub session {
Subroutine session: called CC=2 SCAR=6.9
Pod documented
22 2 my $self = shift;
23 2 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) { } 1 1 2
24 1 $self->{session} = shift;
25 1 return $self;
26 } else {
27 1 return $self->{session};
28 }
29 }
30  
31 1 ▶sub dispatch {
Subroutine dispatch: called CC=1 SCAR=0.0
Pod documented
32 1 my $self = shift;
33 1 $self->session->store();
34 }
35  
36  
37 2 1;
38  
39  
40 __END__
« WebApp/Segment/Decline.pm ↑ Summary WebApp/Segment/Decline/SessionInStore.pm »