Data::Dumper Debugging

I've never really used the Perl debugger much (maybe I should learn?) and usually resort to lots of use Data::Dumper; print Dumper($somevar); statements to help me understand what's going wrong with a piece of code. However, what I often find…

Type::Tiny Tricks #7: Tricks with Dicts

In Perl, hashes are typically used for two sorts of purposes: maps (where the hash key acts as an object identifier) and dictionaries (where the hash key acts like a field name). A quick illustration of what I mean…

Type::Tiny Tricks #6: Tricks with Tuples

Let's say you want an attribute to accept a pair of numbers – perhaps a geographic co-ordinates [ 50.873, -0.002 ]. You could constrain the attribute as ArrayRef[Num], but that would accept an arrayref containing a single number, or…

Type::Tiny 1.000000 Released

It's been almost 17 months, and over 160 releases to get there, but Type-Tiny 1.000000 has been released on CPAN Day 2014. Type-Tiny is a framework for type constraints and coercions. It can be used for isa checks in Moose,…