11 use Plack::Session::State;
12 use Plack::Session::Store::Null;
14 my $storage = Plack::Session::Store::Null->new;
15 my $state = Plack::Session::State->new;
16 my $request_creator = sub {
17 open my $in, '<', \do { my $d };
19 'psgi.version' => [ 1, 0 ],
21 'psgi.errors' => *STDERR,
22 'psgi.url_scheme' => 'http',
24 REQUEST_METHOD => 'GET',
26 my $r = Plack::Request->new( $env );
32 my $r = $request_creator->();
34 my $s = Plack::Session->new(
40 ok($s->id, '... got a session id');
42 ok(!$s->get('foo'), '... no value stored in foo for session');
45 $s->set( foo => 'bar' );
46 } '... set the value successfully in session';
48 ok(!$s->get('foo'), '... still no value stored in foo for session (null store)');
52 } '... removed the value successfully in session';
56 } '... expire session successfully';
58 my $resp = $r->new_response;
61 $s->finalize( $resp );
62 } '... finalized session successfully';