Re: [Module::Build] notes on notes
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <Ra...@Th...> - 2004-01-01 09:12:38
|
On 12/31/2003 4:42 AM, Uri Guttman wrote: > another thing i mentioned that dave did was to write out the args to a > stem config file. he also read it back in in Build.PL and passed it to > the default args hash. so it was sorta like a persistant set of config > args if you rebuilt Build. would the notes stuff be persistant at that > level too? or are notes only persistant after Build.PL is run? the > feature dave seemed to want was to use the past install config values as > the new defaults for the query phase. how would this be done with notes? > i think they are written to the _build dir stuff but are they read in > when Build.PL is run? and if so, can i get at them before i do the > queries? i will experiment and study the code to see what i can do but > if you can answer it now, it will save me from having to do more > dispicable rtfming. :) I don't know if I'm completely understanding what your talking about, but I went ahead and wrote some code. =) The attached patch for M::B provides support for answer scripts. It was extremely easy to implement thanks to M::B's great architecture. Currently, it will create an answer script from the answers to prompt() and y_n() queries, store the answers in 'Build.ans' (configurable). The next run will use those answers as defaults. You can also edit the answer file, taking out the '?? interactive' line (lines begin with '??' for flags or '?? #' for comments), so that the prompts are answered non-interactively which means you can easily automate testing of multiple configs. The obvious extension to this would be to provide for storing answers to non-interactive queries. For example, if you write a Build.PL that does a lot of probing, you might want to store the results of the first probe in order to save time on subsequent runs. But I'll let you play with this and see what Ken thinks before I do anymore. Regards, Randy. |