March 2013 Archives

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 (to show the list of a release's dependencies), by 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...

About Toby Inkster

user-pic I'm tobyink on CPAN, IRC and PerlMonks.