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

Introducing Marlin

Does the Perl world need another object-oriented programming framework? To be honest, probably not. But here’s why you might want to give Marlin a try anyway. Most of your constructors and accessors will be implemented in XS and be really, really fast. If you accept a few basic principles like “attributes should usually be read-only”, … Continued

Type::Tiny 2.8.0 Released

What’s new? The BoolLike type constraint accepts boolean.pm booleans. Type::Params offers some improvements for DWIM named parameter processing. More shortcuts are provided for exporting parameterized versions of type constraints….

Matching simply

A little over ten years ago, when Perl 5.18 was approaching its release date, I released match::simple. This was mostly in response to the smartmatch operator (~~) being deprecated, but also a solution to the incredibly arcane rules for…

Introducing Exporter::Almighty

Consider a simple module like this: package MyApp::Util::Maths; use strict; use warnings; use constant PI => 3.14159265358979; use constant EULER => 2.71828182845905; use base ‘Exporter’; our @EXPORT_OK = qw( PI EULER add ); our %EXPORT_TAGS = ( arithmetic =>…

Using Type::Params Effectively

One of the modules bundled with Type::Tiny is Type::Params, a module that allows you to validate subroutine signatures using type constraints. It’s one of the more popular parts of the suite. This article provides a few hints for using…

Perl Testing in 2023

With my open source work, I’ve historically taken an approach which relies more on integration testing than unit testing, but with some of my newer projects, I’ve tried adopting principles from $paidwork and applying them to my free software. This…

Type::Tiny v2 is Coming

Eagle-eyed watchers of CPAN may have noticed that I’ve recently been releasing Type::Tiny development releases with version numbers 1.999_XYZ. Type::Tiny v2 is intended to be compatible with Type::Tiny v1. If you’ve used Type::Tiny v1, you shouldn’t need to change…

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…

Mood Lighting

The lighting in my bedroom uses Philips Hue bulbs — specifically, the coloured ones. Last night, I decided it would be nice to set the three lights in my bedroom to cycle slowly through a set of warm colours using…