Commit | Line | Data |
9e447f9d |
1 | #!/usr/bin/perl |
2 | |
3 | package Catalyst::Plugin::Session::State; |
4 | |
5 | use strict; |
6 | use warnings; |
7 | |
9e447f9d |
8 | __PACKAGE__; |
9 | |
10 | __END__ |
11 | |
12 | =pod |
13 | |
14 | =head1 NAME |
15 | |
16 | Catalyst::Plugin::Session::State - Base class for session state |
c80e9f04 |
17 | preservation plugins. |
9e447f9d |
18 | |
19 | =head1 SYNOPSIS |
20 | |
c80e9f04 |
21 | package Catalyst::Plugin::Session::State::MyBackend; |
22 | use base qw/Catalyst::Plugin::Session::State/; |
9e447f9d |
23 | |
24 | =head1 DESCRIPTION |
25 | |
c80e9f04 |
26 | This class doesn't actually provide any functionality, but when the |
27 | C<Catalyst::Plugin::Session> module sets up it will check to see that |
28 | C<< YourApp->isa("Catalyst::Plugin::Session::State") >>. |
29 | |
30 | When you write a session state plugin you should subclass this module this |
31 | reason only. |
32 | |
33 | =head1 WRITING STATE PLUGINS |
34 | |
35 | To write a session state plugin you usually need to extend C<finalize> and |
36 | C<prepare> (or e.g. C<prepare_action>) to do two things: |
37 | |
38 | =over 4 |
39 | |
40 | =item * |
41 | |
42 | Set C<sessionid> (accessor) at B<prepare> time using data in the request |
43 | |
44 | =item * |
45 | |
46 | Modify the response at B<finalize> to include the session ID if C<sessionid> is |
47 | defined. |
48 | |
49 | =back |
50 | |
9e447f9d |
51 | =cut |
52 | |
53 | |
c80e9f04 |
54 | |
55 | |
56 | |