Type::Tiny - not just for attributes

OK, so I've gotten back from the May Day parade, had some lunch, and now it's time for me to write about Type::Tiny some more...

Thought for the day: Perl 5 is English; Perl 6 is Esperanto.

Esperanto may be a saner language than English in every way.

But English is the language of Shakespeare, of Milton, of Byron, of Dylan Thomas; the language of Arthur Conan-Doyle and Agatha Christie; the language of Tolkien and C S Lewis; of Lewis Carroll and Beatrix Potter. It's the language of Stoker and Shelley.

Wikipedia notes that over 100 original novels have been published in Esperanto. Big woop-dee-doo(!)

I want to be able to use Perl 6 day to day, but not if that involves missing out on Perl 5's li…

Introducing Type::Tiny

Type::Tiny is a tiny (no non-core dependencies) framework for building type constraints. OK, probably not that exciting. How can I grab your attention?

                         Rate            WithMoose WithMooseAndTypeTiny
 WithMoose             8071/s                   --                 -25%
 WithMooseAndTypeTiny 10778/s                  34%                   --

The benchmark script is shown later so you can check I'm not doing anything hideously unfair to disadvantage Moose.

How can I hold your attention?

Introducing Platform

So, what's the big idea?

Perl projects have all manner of ways of declaring their dependencies. CPAN releases usually include a file called META.yml or META.json listing their dependencies (though Makefile.PL or Build.PL is also supposed to generate a list of dependencies when it runs; this allows the release to dynamically decide on different dependencies based on the machine it's running on). Non-CPAN projects can declare their CPAN dependencies using cpanfile too.

Once the dependencies are declared, this information is used by CPAN clients, by metacpan.org (to show the list of a release's dependencies), by http://deps.cpantesters.org/ and so on.

However, this only works where you want to declare dependencies on CPAN modules, or on a minimum version of Perl itself.

Not using that any more...

OK, so sometimes you decide you're going to stop using some module X, maybe because something better has come along. Let's say I want to track down all my CPAN modules that use Any::Moose because my goal is to port each of them to either Moose or Moo.

MetaCPAN has all the dependency information, but I don't want to click through each of my distributions. Enter the MetaCPAN API...