[Module::Build] M::B subclass .pm file locations
Status: Beta
Brought to you by:
kwilliams
From: Ray Z. <rz...@co...> - 2006-06-01 21:37:37
|
I'm looking for recommendations for how where to put my Module::Build sub-classes and how to set up @INC to find them. Here's my scenario ... I'm working with a set of Perl packages that are organized as a base package A with a number of add-on packages. Let's call one of the add-on packages B. So A is a prerequisite for B (i.e. A must be installed in order to build, test and install any of B). I have a common Module::Build sub-class, call it Bbuilder, that I use for all B. Since A must be installed in order to build B anyway, it seems logical to have Bbuilder.pm be included as part of A. To build A, I have another M::B sub-class, call it Abuilder, which is a sub-class of Bbuilder. If Bbuilder.pm is placed in A/lib, it gets installed as part of A and the Build.PL script for B is very straightforward. The question is, where do I put Abuilder.pm, and how do I manipulate @INC inside the Build.PL script for A to get what I want. Are there conventions for where to put these things? I'm currently thinking of putting Abuilder.pm in A/t and Bbuilder in A/lib and doing ... use lib qw( lib t ); require Abuilder; ... at the beginning of Build.PL. Any better ideas? Ray Zimmerman Director, Laboratory for Experimental Economics and Decision Research 428-B Phillips Hall, Cornell University, Ithaca, NY 14853 phone: (607) 255-9645 |