learn.perl.org relanched - and includes PerlFAQ

http://learn.perl.org/ has just been relaunched.

New content, screencasts and step by step guides for people new to Perl.

The PerlFAQ has also been integrated and updated a bit (more to come). If you are interested in helping update the PerFAQ please visit the github repo or join us on irc.perl.org #perl-faq

Plack basics - talk at YAPC::EU 2011

So, I should really have blogged about Day 1 and 2 of the conference, which has been fantastic, but also hectic, I'll try catchup soon...

Anyway, I wanted to link the slides from my Plack basics talk.

Thanks to Miyagawa, who's 2010 talk I based it on and to Alex and Damian who's speaker training helped me refine what I'd done even further.

It was really encouraging to have so many people afterwards come up and say they were ei…

YAPC::EU Day -1

I arrived yesterday (conference -2 days) afternoon, we met up with various mongers, had a crap experience trying to get food in one place, and then found somewhere that did very good steaks, followed by a quick drink in the main square.

Today, a bit more with it, acme, ralf, Michael and myself had a stroll around the main market - housed in old Zeppelin hangers! - which was interesting and had very tasty donuts, and a general look around the old town.

I then attended the Speakers training run by Alex Kapranov with Damian Conw…

Cacheing Plack Proxy - speed up development

At work we scrape data from a slow government website (it's public data and you are allowed to use it, but they don't have a way to download it!).

We thought if only there was a quick way to cache the results as we develop the code...

A CPAN search later... we want a proxy and something to cache

use Plack::Builder;
use Plack::App::Proxy;
use Plack::Middleware::Cache;

my $app
    = Plack::App…

Deploying a Perl App to DotCloud

Deploying a Perl Plack / PSGI application to DotCloud hosting is very easy.

Following the announcement that DotCloud are now supporting Perl I managed to get a test account and had a play.

I already had python installed on my Mac so the steps were...

  • sudo easy_install dotcloud
  • dotcloud create leotest
  • dotcloud deploy --type perl leotest.www
  • git://github.com/ranguard/plack-example.git
  • cd plack-example/multiple_roots/
  • dotcloud push leotest.www ./
  • open http://www.leotest.dotcloud.com/

My multiple_roots test is a slightly contrived configuration, using Plack::App::TemplateToolkit with multiple roots for static and dynamic content, this is configured in the app.psgi. I had put it together when I was developing Plack::App::TemplateToolkit so thought it was a good example to test.

The only issue I had was that the default configuration of DotCloud serves anything in ^static directly through nginx so I had to rename my directories to get it to work. Previously I didn't have a Makefile.PL as this had just been for testing, I created one, so the dependencies could be installed.

You can see the final (although visually dull!) result at http://www.leotest.dotcloud.com/.

I can see myself using this service a lot in the near future.