1 Apr 2005 20:50
Re: [Module::Build] Re: Test::META
Randy W. Sims <ml-perl <at> thepierianspring.org>
2005-04-01 18:50:34 GMT
2005-04-01 18:50:34 GMT
Ok, this is working now, but there are a few issues. 1. As touched on by Ken and Schwern, per-action prereqs are somewhat idiosyncratic. Because dependencies are determined at run time you run into problems where for example you set build_requires, and then run `./Build.PL && ./Build test` (skipping the 'build' action). Since the 'test' action depends on the 'code' action instead of the 'build' action, the 'build' prereqs are not checked. If the 'test' action did depend directly on 'build', there would still be the problem that only failed 'test' prereqs would be displayed until resolved and then, as it works through the dependencies in turn, failed prereqs for the next action will be displayed, as opposed to all failures for the complete dependency graph showing up immediately. PROPOSAL: Create a register_core_dependencies() method called from _construct() that registers the dependencies for each of the core actions, creating a dependency graph. This graph can be examined at during dispatch() time for failed prereqs, and to determine which actions to execute based on dependencies. This is in addtion to, and possibly replacement of, the depends_on() technique. The two methods should work in tandem with no problems. There would also be a register_dependencies() method which can be overriden in subclasses so that authors can set up dependencies for their custom actions or use depends_on(). I'm not quite sure what to do about 'test' depending on 'code' not checking for failed 'build' prereqs. I guess we could special case 'build_*' dependencies for backwards compatability??? Are there other cases? If so we might need a translation table that, for example, indicates that when 'code' prereqs are being checked we also need to(Continue reading)
RSS Feed