This weekend saw more work on "module madness", my frontal assault on the Module:: and CPAN:: namespaces, reimplementing generalised versions of current specific tasks and generally trying to make a whole stack of reusable distribution-related components I can use to then put together various interesting tools.
This weekend's contribution is CPAN::Inject.
This is really just a simplified version of Shawn Sorichetti's CPAN::Mini::Inject module, with the configuration and index-updating magic removed.
On the face of it, this might seem of little use.
But because CPAN::Inject only touches the AUTHOR's directory, we can now not only inject to a minicpan mirror, but we can also inject commercial or otherwise non-CPAN distributions directly into the local CPAN sources directory, where you can then install them with the normal recursive dependency installation behaviours via the CPAN shell.
And with the creation of the reserved "LOCAL" CPAN author, we now also have a friendly and supported default place to put the tarballs.
I've thrown together a very simple "cpaninject" script to add a console interface to the module, so now you can do the following.
> sudo cpaninject any/arbitrary/perldistribution.tar.gz
> sudo cpan
cpan> install LOCAL/perldistribution.tar.gz
Now, if you're anything like me, that looks like 2 commands too many.
That's because cpaninject is just a quicky console interface. I plan to create a seperate module that implements a more-comprehensive equivalent, with some interesting additional features I plan to unveil later.
CPAN::Inject is also one of the last missing pieces for the PITA core functionality, or at least it's partly what's holding up the CPAN Testers 2 implementation.
With this out the way, we're left with just one missing piece for the PITA core, which is the POE-based image support server (the first non-POE implementation I wrote was not good enough and I've scrapped it).