adding in the dump_session method to the Store classes
[catagits/Web-Session.git] / lib / Plack / Session / Store / Null.pm
1 package Plack::Session::Store::Null;
2 use strict;
3 use warnings;
4
5 sub new     { bless {} => shift }
6 sub fetch   {}
7 sub store   {}
8 sub delete  {}
9 sub cleanup {}
10 sub persist {}
11
12 sub dump_session { +{} }
13
14 1;
15
16 __END__
17
18 =pod
19
20 =head1 NAME
21
22 Plack::Session::Store::Null - Null store
23
24 =head1 SYNOPSIS
25
26   use Plack::Builder;
27   use Plack::Middleware::Session;
28   use Plack::Session::Store::Null;
29
30   my $app = sub {
31       return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello Foo' ] ];
32   };
33
34   builder {
35       enable 'Session',
36           store => Plack::Session::Store::Null->new;
37       $app;
38   };
39
40 =head1 DESCRIPTION
41
42 Sometimes you don't want to store anything in your sessions, but
43 L<Plack::Session> requires a C<store> instance, so you can use this
44 one and all methods will return null.
45
46 This is a subclass of L<Plack::Session::Store> and implements
47 it's full interface.
48
49 =head1 BUGS
50
51 All complex software has bugs lurking in it, and this module is no
52 exception. If you find a bug please either email me, or add the bug
53 to cpan-RT.
54
55 =head1 AUTHOR
56
57 Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
58
59 =head1 COPYRIGHT AND LICENSE
60
61 Copyright 2009 Infinity Interactive, Inc.
62
63 L<http://www.iinteractive.com>
64
65 This library is free software; you can redistribute it and/or modify
66 it under the same terms as Perl itself.
67
68 =cut
69