From: Tatsuhiko Miyagawa Date: Fri, 10 Dec 2010 17:12:31 +0000 (-0800) Subject: Added a note about using Plack::Request X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FWeb-Session.git;a=commitdiff_plain;h=821873e15cb2dc7950994f80a0c2d3a95a8d6465 Added a note about using Plack::Request --- diff --git a/examples/app.psgi b/examples/counter-raw.psgi old mode 100644 new mode 100755 similarity index 76% rename from examples/app.psgi rename to examples/counter-raw.psgi index cb67b09..273d4b7 --- a/examples/app.psgi +++ b/examples/counter-raw.psgi @@ -1,5 +1,15 @@ #!/usr/bin/perl +# Simple counter web application +# NOTE: This example uses Plack::Request to illustrate how +# Plack::Middleware::Session interface ($env->{'psgix.session'}) could +# be wrapped and integrated as part of the request API. See Tatsumaki +# (integrated via subclassing Plack::Request) and Dancer::Session::PSGI +# how to adapt Plack::Middleware::Session to web frameworks API. + +# You're not recommended to write a new web applicaiton using this style. + +use strict; use Plack::Session; use Plack::Session::State; use Plack::Session::State::Cookie; @@ -53,4 +63,4 @@ my $app = Plack::Middleware::Session->wrap( }, state => Plack::Session::State::Cookie->new, store => Plack::Session::Store->new, -); \ No newline at end of file +);