Dancing on a cloud made of pearls

Thanks to a post on Hacker News, I got access to the beta test for DotCloud. In this blog post, I show how I got started and successfully deployed a small Perl Dancer web app to the service.

I was extremely pleased with how easy it was to do the above, and wanted to share it!

Inline::C optimizations

At the last (first, actually) Glasgow.pm meeting last week, I mentioned to a couple of the people present an instance in which I've used the wonderful Inline::C module to replace a chunk of Perl code I couldn't quite get to work fast enough.

Resurrecting Glasgow.pm

During YAPC::EU mst suggested "why don't you just start Glasgow.pm?"

I talked about it a bit with a friend who'll be back in the country soon enough and even today at work, and I think we may have enough people to kickstart the new Perl mongers group.

I know there are several businesses and people in the West of Scotland who either use or like Perl, so I am hoping that enough of them would like to join the group.

I've sent the request to pm.org's support to reinstate the old Glasgow.pm. I will endeavour to bring the mailing list and website up as soon as possible, and …

SproutCore and Tatsumaki

I added a Perl backend version of the SproutCore tutorial to the wiki. It was useful to see how Tatsumaki (the new framework by Tatsushiko Miyagawa) worked, and also because PSGI is quite fun to use!

Is that perl 5.12 on your netbook?


Just finished installing the brand spanking new Perl 5.12 on the netbook on my "perl" account, with which I tested already earlier -RC releases with my personal code.

It's fair to say that the user experience has gone a long way from the "old days" of manual configuration, installation, swearing and $ENV madness. Hell, one doesn't even need local::lib anymore!

All I had to do to test 5.12 after creating my "perl" account was:

curl -LO http://xrl.us/perlbrew
chmod +x ./perlbrew
./perlbrew install
rm perlbrew 
~/perl5/perlbrew/bin/perlbrew init
echo 'source /home/perl/perl5/perlbrew/etc/bashrc' >> .bashrc  
source .bashrc
echo $PATH
perlbrew install perl-5.12.0
# wait some time..
perlbrew switch perl-5.12.0
perl -V

There you go, shiny new Perl to be used!

git clone git://github.com/miyagawa/cpanminus.git
cd cpanminus
make test install
cpanm YAML
# and YAML's installed
perl -E'use YAML;say Dump({"sound"=>["YAML!"]})'

On my desktop machine instead I started versioning ~/perl5/ under Git starting with -RC4, adding and committing all the cpanm-installed modules as I went. This helped a lot with remembering which modules got installed (although perldoc perllocal also keeps track of that!) in order to install them again when testing the new -RC or the new 5.12. Although, I wasn't entirely consistent with the naming of the commits. Meh.

I only had a couple issues with modules like Gearman::XS which required the latest and greatest library which wasn't available on Ubuntu Lucid. I simply reset the Git tree when the builds didn't work. For Gearman::XS I downloaded, committed, tested and installed the latest version (having it Git-versioned helps) and then rebuilt Gearman::XS with a couple environment variables (also noted on the commit logs).

One learns from their mistakes, so I'll use another format for the commit messages when I'll install and test 5.12 on my desktop account: I'll make sure to "tag" the cpanm commits as such (for example, with which cpanm command I issued and with the list of additional modules installed after the blank line in the Git commit) and the modules requiring installation of other libraries also in a different and sensible way.

The idea would be to be able to do something like the following, and being able to have a good list of commands I need to type to have all my favourite modules on the new Perl version with minimum effort:

git log --pretty=oneline | cut -d ' ' -f 2- | tac

From there, I'll just go through my ~/GIT/ and run the test suites there. Maybe I'll have some code ready for the next post.

For now, I just want to say THANKS to the wonderful Perl 5 Porters who did manage to get the next stable release out as promised. I look forward to 5.14!