X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FPlack%2FSession%2FStore%2FNull.pm;h=a68193bc0fe252a133056cc9d56117f392e2fab7;hb=98f62fd71971d0b21a90f840ef52ec7907432cf5;hp=3ab6ccb8dcf7c9a356d958996eef9951d65ea241;hpb=9bb2075077bc58387a991b29c9cae4066384e00d;p=catagits%2FWeb-Session.git diff --git a/lib/Plack/Session/Store/Null.pm b/lib/Plack/Session/Store/Null.pm index 3ab6ccb..a68193b 100644 --- a/lib/Plack/Session/Store/Null.pm +++ b/lib/Plack/Session/Store/Null.pm @@ -2,12 +2,13 @@ package Plack::Session::Store::Null; use strict; use warnings; +our $VERSION = '0.09_02'; +our $AUTHORITY = 'cpan:STEVAN'; + sub new { bless {} => shift } sub fetch {} sub store {} -sub delete {} -sub cleanup {} -sub persist {} +sub remove {} 1; @@ -19,12 +20,31 @@ __END__ Plack::Session::Store::Null - Null store +=head1 SYNOPSIS + + use Plack::Builder; + use Plack::Middleware::Session; + use Plack::Session::Store::Null; + + my $app = sub { + return [ 200, [ 'Content-Type' => 'text/plain' ], [ 'Hello Foo' ] ]; + }; + + builder { + enable 'Session', + store => Plack::Session::Store::Null->new; + $app; + }; + =head1 DESCRIPTION Sometimes you don't want to store anything in your sessions, but L requires a C instance, so you can use this one and all methods will return null. +This is a subclass of L and implements +it's full interface. + =head1 BUGS All complex software has bugs lurking in it, and this module is no @@ -37,7 +57,7 @@ Stevan Little Estevan.little@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2009 Infinity Interactive, Inc. +Copyright 2009, 2010 Infinity Interactive, Inc. L