Re: [Module::Build] notes on notes
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <Ra...@Th...> - 2004-01-02 04:21:19
|
On 1/1/2004 4:12 AM, Randy W. Sims wrote: > 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. Here is an extended version: Example: ?? interactive ?? no_clobber John Doe jd...@so... y ?? force Hello, World! ?? # store these so we don't have to look em up again. ?? set ftp = /usr/local/bin/ncftp ?? set cc = /usr/bin/gcc ?? eof Answer script format: Each line represent an answer to a fixed sequence of prompts unless the line begins with '??' in which case it is a command or flag. The flags are: 'interactive' => means the answers in the script are to be used as defaults for an interactive session instead of as an automated answer script. 'no_clobber' => prevents M::B from overwritting the answer file. Normally, in interactive mode M::B records the answers to prompts and then saves a new answer file so that on the next run the new answers will be used as the new defaults. The commands are: 'default' => use the default specified to the prompt() or y_n() functions. 'alt <value>' => use the default specified to the prompt() or y_n() functions if available, other wise use <value>. 'force <value>' => in interactive mode, skip the prompt using <value> as the answer. 'set <key> = <value>' => stores (key, value) pairs that can be retrieved with the retrieve_answer() api. see below. '#' => a comment. ignored. The api: store_answer(<key>, <value>) => stores the (key, value) pair to be written to the answer file. Can be used to store info that may otherwise be time consuming to gather, like a cache. retrieve_answer(<key>) => retrieves the value stored in <key> from the answer file. Regards, Randy. |