Added a note about using Plack::Request
Tatsuhiko Miyagawa [Fri, 10 Dec 2010 17:12:31 +0000 (09:12 -0800)]
examples/counter-raw.psgi [moved from examples/app.psgi with 76% similarity, mode: 0755]

old mode 100644 (file)
new mode 100755 (executable)
similarity index 76%
rename from examples/app.psgi
rename to examples/counter-raw.psgi
index cb67b09..273d4b7
@@ -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
+);