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...
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…
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?
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.
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...
Search this blog
- Type::Tiny - not just for attributes
- Thought for the day: Perl 5 is English; Perl 6 is Esperanto.
- Introducing Type::Tiny
- Introducing Platform
- Not using that any more...
- Pod to HTML
- Perl 10
- Windows CPAN Testers, your help please...
- Ask not what your user can do for you...
- w00t! First CPAN upload of 2013!