Let's play with overloading a little. A simple class: package Local::Overloaded { use Moo; has number => ( is => 'ro' ); use overload '0+' => sub { my $self = shift; return $self->number; }; } And let's test...| Toby Inkster
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 =>...| Toby Inkster
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.| blogs.perl.org
What's new?| blogs.perl.org
Perl has had the CPAN and awesome websites like MetaCPAN and its predecessor search.cpan.org for a long time, so unlike how things happen in other programming language ecosystems, many Perl projects have felt no need to start their own websites for documentation, package downloads, and community — all these things were already provided.| blogs.perl.org
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.| blogs.perl.org
Let's look at the XSPF playlist format. It's a pretty simple XML-based file format.| blogs.perl.org
Consider the following fairly simple class, which creates a lookup object for month names:| blogs.perl.org
Matthew Persico| blogs.perl.org
Moose is great, but it does introduce a slight performance hit to your code. In the more than 15 years since it was first released, hardware improvements have made this less of a problem than it once was. Even so, if performance is a concern for your project, Moose might not be what you want. It also has a fairly big collection of non-core dependencies.| blogs.perl.org
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 a script.| blogs.perl.org
For letting me know my test coverage has increased by 0.00006%.| blogs.perl.org
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 how the smartmatch operator operated.| blogs.perl.org
This is a variant of SemVer which mostly meets all its rules, except for releases prior to 0.2.0, where we bend them slightly.| blogs.perl.org
Eagle-eyed watchers of CPAN may have noticed that I've recently been releasing Type::Tiny development releases with version numbers 1.999_XYZ.| blogs.perl.org