August 2010 Archives

I hate the param method from CGI

Scalar and list content is a nice and advanced feature of perl. Sometimes I think it's a bit too smart for us who use perl.

In our code we have a lot of method calls like this

$obj->foo( name1 => $value, name2 => bar() );

We do a lot of web stuff and often we like to pass the user input to a method like this:

$obj->foo( name1 => $value, name2 => $cgi->param("inputkey") );

This code is bad! It should be

$obj->foo( name1 => $value, name2 => scalar($cgi->param("inputkey")) );


What I learned at YAPC::EU 2010

This is a small list of stuff I learned at YAPC::EU 2010 in Pisa.

  • I can blog here at
  • I need to look at Try::Tiny. It's supposed to be (exceptionally) good at handling exceptions
  • The WWW::Mechanize::Firefox talk by Max Maischein should have been a bit longer. Max said he used RT for support questions and bug reports
  • The bars in Pisa close early and without any warning
  • People compile and install their own perl instead of using the version that comes with the OS
  • A lot of people use FastCGI instead of mod_perl. Fas…

About anielsen

user-pic I blog about Perl.