http://qs1969.pair.com?node_id=193077

mp has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to develop a build process to create a handful of webserver configuration files (httpd.conf, perl modules that are included on server startup, etc.) for multiple non-identical servers. I am planning to use Template Toolkit to generate the configuration files from a set of templates that differ per server, and some common data that the templates pull in. I am using CVS to manage sharing the source files (templates, data, and perl modules that implement the site) between the various servers.

I have a pretty good handle on how to go about writing and organizing the template files and writing the code to expand them into particular config files, but I don't have a very good handle on how to setup the overall build process.

What I envision is doing a CVS update on the server in question, running something that generates a correct Makefile based on the server's hostname. Then run 'make' to build the files prior to install, 'make test' to do some basic sanity checks, 'make install' to copy the files to their final destination in the appropriate config directories.

To me, this sounds a lot like the typical build process for CPAN modules, but I don't have experience with writing modules for CPAN, only installing and using them. The main difference seems to be that the files in question are primarily configuration files for Apache rather than perl modules and that their destination directories differ.

Is doing something based on ExtUtils::MakeMaker a good way to approach this problem (I have no experience with it)? Or, is there something simpler that I should look at? Overall, does what I described here seem like a sound approach?