Permalink
Browse files

s/PlackX/Plack/. Also added the consideration about using array ref f…

…or header values
  • Loading branch information...
1 parent 9fcb9b6 commit 1a15c1bee64cc97a8b1bb70eccf4fa5860a7b7e7 @miyagawa miyagawa committed Sep 7, 2009
Showing with 13 additions and 3 deletions.
  1. +13 −3 PSGI/FAQ.pod
View
@@ -48,8 +48,8 @@ write PSGI applications. Plack is a reference PSGI implementation that
supports environments like CGI, FastCGI, mod_perl and AnyEvent (TBD).
Plack also has useful APIs and helpers on top of PSGI, such as
-L<PlackX::Request> to provide a nice object-oriented API on request
-objects, and L<PlackX::Up> that defines the standard to run PSGI
+L<Plack::Request> to provide a nice object-oriented API on request
+objects, and L<Plack::Up> that defines the standard to run PSGI
application from command line and configure using C<config.pu> (a la
Rack's Rackup).
@@ -110,17 +110,21 @@ define.
=head3 Why is application a code ref rather than an object with ->call method?
+(Still open to this topic: I think Plack should standardize this)
+
Requiring an object L<in addition to> code ref would make ALL
implementors code a few lines more tedious, while requiring an object
L<instead of> code ref would make application developers to write
another class and instantiate an object.
-L<PlackX::Up> will have a hook to allow your application to implement
+L<Plack::Up> will have a hook to allow your application to implement
object based callback as an application though, which gives you an
option to preload modules and setup parameters etc.
=head3 Why is headers an array ref not hash ref?
+(Still open to this topic: I think Plack should standardize this)
+
Short: In order to support multiple headers (e.g. C<Set-Cookie>).
Long: In Python WSGI, response header is a list of (C<header_name>,
@@ -142,6 +146,12 @@ text/plain, *>). Joining the header values with C<, > is obviously
applications' job. L<HTTP::Headers> does exactly that when it's passed
an array reference as a header value, for instance.
+The other option is to always require application to set value as an
+array ref, even if there is only one entry: this would make
+implementors code less tedious, but, for the exact reason of multiple
+header values vs. multiple header lines with the same name mentioned
+in the paragraph before, I think it's confusing.
+
=head3 No iterators support in $body?
We learned that WSGI and Rack really enjoy the benefit of Python and

0 comments on commit 1a15c1b

Please sign in to comment.