-
Hans Dieter Pearcey
OpenSourcery Alumnus
local::lib is really, really fantastic. It's a simple module: it bundles up all of the settings and environment variables needed to install Perl modules into a private directory. By default it uses ~/perl5, but you can give it some other directory for an argument, so it's perfect for bundling dependencies with your application or installing things in a scratch directory for testing. (It also depends on the correct versions of toolchain modules needed to make things behave consistently, which is a sweet bonus.)
The Makefile.PL has a bootstrap mode, which means that you can configure and install local::lib into one of these private directories without having it pre-installed at all and without touching your @INC.
This is really great, but I want one step better; I want to be able to bootstrap local::lib into a target directory without having to find the latest version, unpack it, etc. I've been working on a script to do this, something likewget -O- $some_url/local-lib | TARGET=./local perl
(possibly with some sort of integration with David Golden's -Mylib), but there are a few tangles I still have to work out.
I did make some progress yesterday. I found a bug in Module::AutoInstall that was breaking the normal installation of local::lib under some circumstances, and I fixed the bootstrapping code in Makefile.PL so that the latest version should install cleanly on Perl 5.8.8 (still the default on many operating systems). Hopefully I'll figure the rest of my problems out this weekend, and local::lib will become even easier to use.
WANT
I want something like this for my toolbox I had started looking into it myself. Thank you for fixing one of the last toolchain bugs in the basis of a proper SDK foundation.
Polish domains are the way forward :)
wget -O- http://install.local-lib.pl | TARGET=./local perl
Add your comment