Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

chromatic (983)

  (email not shown publicly)

Blog Information [] Profile for chr0matic []

Journal of chromatic (983)

Friday June 10, 2005
12:28 AM

Bootstrapping Is Harder Than It Looks

[ #25127 ]

In my copious free time not taken up by a dozen other projects, I've been working on Module::Build::TestReporter to make version 1.0 available before Perl Testing: A Developer's Notebook comes out. (I still have yet to bundle Test::Kwalitee.)

After the first release, Stig Brautaset pointed out that there's a bootstrapping problem for people who want to use MBTR. It depends on a few non-core modules, but if you're using Module::Build::TestReporter for your distribution, it won't load without those dependencies -- and you want to mark the build dependencies in your Build.PL file. (You also need to ship MBTR with your distribution, but I can't do much besides document that fact.)

The approach I chose was to attempt to load the necessary modules, trapping any errors. If something failed, I install a different constructor that adds the necessary files to the build_requires parameter and calls Module::Build::new(), which handles the dependencies appropriately.

Testing that logic was a bit of fun, too. Sometimes I wonder if we test module writers test our test modules just to make us less smug.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.