The new Catalyst book from Packt Publishing

Some weeks ago I got a copy of the new Catalyst book from Packt Publishing on the popular MVC web framework for Perl. The new book covers the 5.8 release of Catalyst, which is based on Moose. The book also includes some chapters on Modern Perl topics, namely Moose and DBIx::Class.

I was planning to review the book, but it became quite obvious after a short time that I would not be able to read it thoroughly any time soon (I already have too many other books on my reading list).

If you were wondering whether or not to buy it yourself, they have a sample chapter (PDF) available that can help you make up your mind.

Enda et intervju med meg, denne gangen i Tønsbergs Blad

Link: http://tb.no/nyheter/a-i-absolutt-alt-1.5405893

Den lokale avisen, Tønsbergs Blad, var også interessert i prestasjonene mine på skolen. De har publisert et intervju med meg på forsiden av nettutgaven av avisen.

Intervjuet står også i dagens utgave av avisen, 24. juni 2010, og opptar omtrent en halv side.

Jeg ble oppringt av en annen journalist fra Tønsbergs Blad i dag, og de ønsket å intervjue meg til en annen spalte i avisen. Dette intervjuet skal etter sigende komme på trykk i lørdagsutgaven av avisen, 26. juni 2010.

Intervju med meg på forsiden av hive.no

Link: http://www.hive.no/aktuelt/informatikkstudent-med-toppkarakterer-article14318-110.html

Etter at jeg fullførte informatikkstudiet ved Høgskolen i Vestfold med svært gode resultater ønsket redaktøren for skolens nettsider, Jon Olav Skålid, et intervju med meg.

I tillegg til intervjuet fikk jeg også utdelt en fin blomsterbukett, samt noen velvalgte ord om mine resultater, fra skolens ledelse under tildelingen av vitnemål tirsdag 22. juni 2010.

Jeg ønsker herved å overbringe min takk til skolens ledelse for oppmerksomheten og alle lærerne for et svært godt studium. Det har vært en fornøyelse!

Having problems to install CPAN modules that use Module::Install on Windows?

I have been discussing this problem with Adam Kennedy and some other people at #win32@irc.perl.org today:

Line 388 of Module/Install/Makefile.pm is a blank line, but the line after it is a simple two-arg open().

open MAKEFILE, "> $makefile_name" or
die "fix_up_makefile: Couldn't open $makefile_name: $!";

Side-note: I don't know why they use two-arg open there, but it is probably because Module::Install needs to work back to the stone-age of Perl.

Since the file was opened for read access a couple of lines above it got me thinking. This invalid argument message Windows gives you is its way of saying "hey, the file is locked somewhere else, you can't mess with it".

In the end I figured out that the bad guy here was my anti-virus (AVG). An extremely crude workaround I found that worked was to just put the entire Strawberry Perl in the anti-virus exclusion list. This solved the "invalid argument" message for me, and now my Module::Install-based CPAN modules install as they should.

This is obviously not a very good long-term solution. So this got me thinking a bit more. Who is really at fault here? Is it perl or AVG? Should AVG not allow open() to return before it is finished with its scanning stuff, or should perl handle open() for write differently on Windows, considering the OS itself forces write locking.

I'd really like to hear more about what you guys that know the perl internals have to say about this subject.

Update: Kenichi Ishigaki replied a bit later with a patch to Module::Install that works around the problem. He applied the web counter solution mentioned in perlfaq5 to the problem, and it worked for me. I guess it is now just to wait for Adam Kennedy to release a new version of Module::Install and file bugs against the CPAN modules that show problems on Windows with a message that they should upgrade their Module::Install version and issue a new release of their module.

Update2: Adam Kennedy has released Module::Install 0.98, which contains the patch. Please tell all CPAN module authors that use it to upgrade to the new version and Windows users will be very happy.

Apple, the devil in our midst

So Matt Trout has lost the Iron Man Challenge.

As part of the competition rules it is time to make a vote for a hair color for him and a talk title that he will present at an upcoming Perl conference.

My vote goes to a light blue color as the sky, and the talk title 'Apple, the devil in our midst'.