Plack - give it a go... and white paper
Having had Plack on my 'to looking to list' for a long time we've finally started using it at work. Yet again here is another of the 'modern perl' pieces of software that once you start using you'll wonder how you ever coped without it.
As first it doesn't seem like you have much that wasn't done in Apache (or what ever web server you are using). The moment you realise that you can put everything that was in Apache (rewrite rules, expiry headers, serving static content) into your app.psgi (web application configuration) file and that this will then run under any of the many supported web servers the light bulb goes on.
You can then try Starman or run everything using plackup in your development environment.
The simplicity of Plack's structure $ENV in, [ status, [ headers ], [ content ] ] out makes writing middleware easy and adapting your code to use this standard very clean (even if you don't use one of the many frameworks which already directly support Plack).
I've also added a white paper on Plack to Perl.org.
There still is one thing that you need Apache for: HTTPS.
@zby sure, or Pound, or Perlbal.
Plack is not a replacement for any web server, and as with all web serving I'd recommend running your web servers behind a reverse proxy (like Perlbal, and or Pound).
We actually use Pound (for HTTPS)PerlbalPlack web server (Apache at the moment, Starman in a week or so) for HTTPS and PerlbalPlack web server for HTTP.
We're half way though setting up our .psgi config to automatically start Pound on our development environment, so 'plackup' would also run a HTTPS proxy to the app.
Thanks for writing the White Paper Leo. There needs to be more documentation on Plack and starman along with the psgi interface. Right now it still feels like much of the documentation is aimed at developers doing research as opposed to sysadmins looking for a stable dynamic web development environment.
It would be great if you posted your config somewhere - the problem with HTTPS on the dev box is a major set back for me. After the recent commotion with firesheep HTTPS is a must for virtually every web application.
Hi Leo
Just for the record:
http://savage.net.au/Perl/html/plack.for.beginners.html
http://savage.net.au/Perl/html/session.management.with.plack.html