| 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
| |||||||||||
| 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__ | ||||||||||