September 2011 Archives

DBIx::Class populate Gotcha

Today, we watched a series of test cases failing. Our tests started with a blank database and a series of populate method-calls to create their own test records.

Everything looked obviously right, but after a while of debugging, we found out that the populate method of DBIx::Class::ResultSet behaves differently depending on the context used. In Scalar or List context, the records are inserted using the INSERT statement, while in void context, a bulk insert method is used.

From a performance standpoint, this absolutely makes sense. The documentation does explain this very well.…

Wishlist: filter CPAN modules

Sometimes I wish I could apply a filter named "only list serious modules" when browsing through CPAN. More and more people are mis-using CPAN as a personal storage for modules that are not usable for other people. Other useless modules (aside from those in the 'ACME' namespace) act as a pun on common modules like 'Moose'.

Especially when teaching newcomers how to use the CPAN this leaves a bad impression.

Experienced people quickly learn to skip those things but taking the archive more serious would be nice.

About Wolfgang Kinkeldei

user-pic I blog about Perl.