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…

Zydeco::Lite

Today I released Zydeco::Lite, a re-implementation of Zydeco but just using standard Perl syntax. So for example, class { … } becomes class(sub { …});. This has the advantage of much faster compile time, similar run time speed, fewer dependencies,…

Web Scraping with Zydeco

So I like to keep local copies of my blogs.perl.org blog posts as Atom entries, but noticed yesterday that I had a few gaps in my collection. The Atom feeds offered by blogs.perl.org only have the most recent articles though,…