The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

OpenFrame::WebApp::Segment::Session::Loader - abstract pipeline segment to load sessions

SYNOPSIS

  # abstract class - cannot be used directly

  use Pipeline;
  use OpenFrame::WebApp;

  my $pipe = new Pipeline;

  my $sfactory = new OpenFrame::WebApp::Session::Factory()->type('mem_cache');
  $pipe->store->set( $sfactory );

  # abstract - must use a sub-class:
  my $sloader = new OpenFrame::WebApp::Segment::Session::CookieLoader;
  $pipe->add_segment( $sloader );

  ...

  $pipe->dispatch;

DESCRIPTION

The OpenFrame::WebApp::Segment::Session::Loader class is an abstract session loading segment. It inherits its interface from Pipeline::Segment.

On dispatch() a session is fetched or created using the Pipeline's stored OpenFrame::WebApp::Session::Factory, and a new OpenFrame::WebApp::Segment::Session::Saver object is added to the cleanup pipeline so that any modifications to the session will be saved for the next request.

METHODS
dispatch

dispatch this segment.

$session = $obj->get_session

looks for session id with find_session_id(), and creates/fetches the session using OpenFrame::WebApp::Session::Factory.

$seg = $obj->create_saver_segment( $session )

returns a new OpenFrame::WebApp::Segment::Session::Saver object for this $session.

$id = $obj->find_session_id

abstract method for finding the session id.

AUTHOR

Steve Purkis <spurkis@epn.nu>

Based on OpenFrame::AppKit::Segment::SessionLoader, by James A. Duncan

COPYRIGHT

Copyright (c) 2003 Steve Purkis. All rights reserved. Released under the same license as Perl itself.

SEE ALSO

Pipeline::Segment, OpenFrame::WebApp::Session, OpenFrame::WebApp::Segment::Session::Saver, OpenFrame::WebApp::Segment::Session::CookieLoader

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 95:

'=item' outside of any '=over'

Around line 119:

You forgot a '=back' before '=head1'