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