February 2015 Archives

Moo 2.0

The next stable release of Moo will be version 2.0, and will include some incompatible changes. These changes should affect a pretty small number of modules, and may help point out flaws in the existing code.

The most important change in Moo 2.0 is that it will no longer be applying fatal warnings to classes using it. As Moo has grown to be more widely used on CPAN, it has become obvious that applying fatal warnings is usually unexpected or undesired by other authors, resulting in things like Moo::Lax, or people just avoiding Moo entirely. And authors who prefer fatal warnings can easily apply them to their own code.

Moo 2.0 will also detect a number of cases where people apply modifiers to constructors, or attempt to add attributes to classes that have already been instantiated. These cases never worked correctly, but they will now issue errors.

Another smaller change is that classes without attributes would previously store all parameters to ->new in the object. This was a bug, but had backward compatibility concerns.

I've done testing on all modules depending on Moo, and only found a small number that these changes caused issues with. In most cases, it indicated a bug in the module that hadn't been caught yet.

There is a beta version of Moo 2.0 available on CPAN now as Moo 1.999_001. If you have code that depends on Moo, please test it with this new version.

About Graham Knop