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