Re: [Module::Build] ask() and you will receive
Status: Beta
Brought to you by:
kwilliams
From: John P. <jpe...@ro...> - 2006-04-18 00:37:37
|
Ken Williams wrote: > I do still wonder about the need for this parameter. The author could > just as easily put the value in the options array, and probably with > less typing. I also think this is needless frippery, but for the opposite reason. How's this for an alternative definition: The C<options> array is the list of displayed/prompted options to C<ask()> which a user can choose from; C<ask()> will not return until one of these values has been chosen. The C<default> can either be one of the members of C<options> or some value to indicate that no answer could be obtained (such as would be the case if the Build.PL script had no controlling terminal). As such, the union of the C<default> value with the C<options> array is the list of B<permissible> values, whereas the C<options> array is the list of values which satify an interactive C<ask()>. This gets us both: a) the total list of acceptable values, and b) a way to know for certain that the Build.PL script is running unmanned. I don't see any reason to special case the $default <not-in> @options for a flag when we can infer it directly. John -- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747 |