Our Plack/PSGI website is up at plackperl.org. Yeah, read it like "Black Pearl" :)
MIddlewares
Couple of people have shown interest to Plack and wondered ways to extend PSGI applications or Plack servers by patching them. No, most of the time you don't need to, and you can just write middlewares.
So here are some sample Middlewares: RearrangeHeaders that sorts HTTP headers based on "Good Practice" from 199x, SimpleContentFilter that applies regular expression based filters to response body, and RequestResponseWrapper that passes Plack::Request and expects Plack::Response, much like HTTP::Engine.
Pretty powerful.
Note that this RequestResponseWrapper would lose your "application" compatibility with PSGI though. Your app that takes $req and returns $res is not "PSGI app" anymore. It'd be much simpler you do Plack::Request->new(shift) and then returns $res->finalize in your app and that's still PSGI compatible. Take the wrapper as a sample anyway.
Mason and Maypole
On my way home I was thinking which frameworks should be added to the "Supported frameworks" list on our site to be more exciting. I felt a little old but thought of the two big names from pre-Catalyst era, like 2002-4. Mason and Maypole.
So there you go: HTML::Mason::PSGIHandler and Maypole::PSGI. Both uses CGI::PSGI for the easy migration from their CGI equivalent (HTML::Mason::CGIHandler and CGI::Maypole).
Maypole was a little hard to adapt since their list of dispatchers is hardcoded and uses multiple inheritance (injecting @ISA at runtime ... yeah, like old Catalyst) and you can see my semi-rants in the source code, but overall it works pretty nice.
So who's next? Do you have a web framework that can be added to the list?





What about Mojo/Mojolicious? It claims to have its own "very clean and object oriented API similar to Python WSGI and Ruby Rack"…
Posted by: fc7.myopenid.com | 2009.10.01 at 03:52
WSGI and Rack are not an "object oriented" API but big hash/array based protocols. So that's false :)
Seriously though, Mojo is a monolithic web application server and framework implementation, which is good, and we actually have a server implementation using Mojo::Daemon. Its implementation is suboptimal (not sure if it's our problem or their problem) and we plan to drop it from Plack core once we merge our own prefork daemon implementation.
Not sure about the framework side (Mojolicious). Mojo has Mojo::Server::CGI so writing PSGI.pm based on that would be pretty easy.
Posted by: miyagawa | 2009.10.01 at 03:59
Actually: http://github.com/miyagawa/Mojo-Server-PSGI
:)
Posted by: miyagawa | 2009.10.01 at 04:48
That was quick indeed! Great!
Posted by: fc7.myopenid.com | 2009.10.01 at 05:25
From a Mason author - thanks for including us! We're very excited about a future where we don't have to worry about web server support and can focus on Mason the templating language. :)
Posted by: Jonathan Swartz | 2009.10.01 at 10:32