with tarballs of a bunch of modules, I want to loop round all the tarballs, extracting them, running Makefile.PL, ignore missing dependencies (as we're going to get to them), run make install and skip
... [More]
all tests.
this tool automates those steps.
btfm is based on krang(krang.sf.net) - actually a stripped-down version of krang's build tools.
How does it worksimple, btfm extrats the module and builds it(support Module::Build or MakeMaker).
Quick startget the source and assume you have the source under /tmp/btfm cd /tmp/btfm and run perl bin/module_build. this will install module Expect, IO::Tty and Module::Build from ./src into ./lib directory. These 3 modules are required to build other modules. download a cpan module and save it into ./src directory. note the module name should be of xxx-yyy-0.0.tar.gz format which is cpan convention by default. run perl bin/module_build --module xxx-yyy from /tmp/btfm. this will install the module xxx-yyy into ./lib directory. all built modules are in ./lib/ directory and you can copy them to wherever you want.
There are two common perl module install problems tackled in btfm:
answering module installation question. module installation order.
They are handled by a perl syntax configuration file ./YuSis/Config.pm.
hash ref $Expect_QA is where you can specify the module install question and answer.
array @FIRST_PERL_MODULES specify module installation order.
I have used it a lot on Debian 4.0 and some on solaris. Based on my experience, most of the modules will install fine even if the dependent module is not installed yet as long as the installation doesn't die. As long as the dependent installed in the end, the module still work fine. some modules that i have installed using this tool are DBIx::Class, Class::DBI, DBI, DBD::mysql; Email::Send. Those are the kind of module that has bunch of dependencies.
Commandsto build every modules under ./src directory:
perl bin/module_build
to build a specific module(s):
perl bin/module_build --module xxx-yyy
you can also install more than one modules:
perl bin/module_build --module xxx-yyy --module aaa-bbb
to build all modules under ./src directory except few modules:
perl bin/module_build --skip-module xxx-yyy [Less]