Perl Maven

Search for '{{search_term}}'

Perl tutorials and courses

Modern Perl Web Frameworks

  • Mojolicious light-weight web framework with rainbows and unicorns.
  • Perl Dancer light-weight web framework to rock.
  • Catalyst The MVC web framework of Perl.
  • PSGI/Plack, the low-level superglue between Perl web application frameworks and web servers.
  • CGI, the Common Gateway Interface, for old-school web applications.

Object Oriented Perl

  • OOP, the classic way to write Object Oriented Perl code.
  • Moo, the Minimalist Object Oriented system for Perl.
  • Moose, the 'post modern' Object Oriented system for Perl.

Other Series

Projects and Collections

Code-Maven series

If you are a beginner, or would like to refresh your Perl programming knowledge, you can go over the Perl tutorial or watch the Beginner Perl Maven video course.

If you need to maintain a large piece of software written in Perl by other people in the last 5-10-15 years, that's a challenge. Especially if you did not get proper training in Perl. You are probably limited to a specific and old version of Perl. Check out, the Perl tutorial! You can probably skip the part about installing Perl, but the rest of the tutorial will be relevant for you.

Perl is often used in Test Automation. If you work in this field, or if you'd like to work in this field (it is much more fun to find bugs in other people's code than in yours :), then you can read the Perl tutorial and the series on Test Automation using Perl.

If you build new web applications - either privately or inside a company - you can start by reading the article comparing CGI, mod_perl and PSGI. From there you can go on reading the generic Perl tutorial or the articles on Mojolicious, Perl Dancer, Catalyst, PSGI/Plack, or even CGI, the Common Gateway Interface, for old-school web applications.

Recent Articles

Pro: Modulino: both script and module in Perl

In the Python world it is quite straight forward to make files work either as executables or as modules. In Perl it is a bit strange, but doable.

brian d foy has written a number of articles about Modulinos, but in nutshell a Modulino is a Perl file that can act both as an executable (a script that you would invoke directly) or as a module (Something you load into memory and expect to execute code only when you call one of its functions or methods).

Modulino: both script and module in Perl

Pro: Open file to read and write in Perl, oh and lock it too

If you don't have time to read this, just use

open my $fh, '+<', $filename or die;

If you have time, read on.

In most cases when you need to updated a file the best strategy is to read the entire file into memory, make the changes and then write the whole file back. Well, of course unless the file is too big, which is a separate story.

Open file to read and write in Perl, oh and lock it too

Moose testing type constraint

In the previous episode of the Moose tutorial we saw how to declare a type-constraint, and what happens if we call a setter with a value that does not pass this type-checking.

This time we'll write formal tests for these cases. Especially interesting how to test that the class indeed throws the exception when it receives values that don't pass the type-checking.

At first it might be a bit strange that we test if there was an exception, but this exception is part of the API of the module. We want to make sure that even if the implementation of the module changes, it will still throw an exception.

Moose testing type constraint