How can we make this Moose faster?

(I make no apologies for the ChatGPT images in my recent blog posts, by the way. No artists are missing out on being paid: I wasn’t going to hire an artist to illustrate these blog posts which will be read by like three people.) A while back, I wrote MooseX::XSAccessor which you can add to … Continued

Marlin Racing

When I first introduced Marlin, it seemed the only OO framework which could beat its constructor in speed was the one generated by the new Perl core class keyword. Which seems fair, as that’s implemented in C and is tightly integrated with the Perl interpreter. However, I’m pleased to say that Marlin’s constructors are now … Continued

RFC: new API for Type::Params

Firstly, I’m not planning on breaking compatibility with Type::Params. The new API would live under a different namespace, such as Type::Params2. The API for Type::Params is currently: use feature ‘state’; use Type::Params qw( compile compile_named_oo ); use Types::Standard -types; sub…

Announcing Zydeco

Technically, I already announced it, but now I’ve renamed it. MooX::Pression is now called Zydeco. Moops had a memorable name, and I think the naming really helped it gain a following. MooX::Pression was just meh. So now it’s Zydeco. Zydeco…

Announcing MooX::Press

MooX::Press is a quick way of building a bunch of Moo roles and classes in one use statement. The most basic example would be: package MyApp { use MooX::Press class => [‘Foo’, ‘Bar’]; } my $thing1 = MyApp::Foo->new(); my…

What is a Bool?

Perl allows pretty much any value to be evaluated in a boolean context: if ($something) { … } No matter what $something is, it will safely evaluate to either true or false. (With the exceptions of a few edge cases…

Planet Moose – May 2014

Welcome to Planet Moose, a brief write up on what’s been happening in the world of Moose in the past month, for the benefit of those of you who don’t have their eyes permanently glued to the #moose IRC channel,…

Enumerations in Moose

It’s quite a common pattern in object-oriented programming to have an attribute which takes a string as its value, but which only has a small number of valid values. For example: package Shirt; use Moose; # “S”, “M”, “L”,…