Re: [Module::Build] ask() and you will receive
Status: Beta
Brought to you by:
kwilliams
From: Randy W. S. <ml...@th...> - 2006-04-11 22:33:05
|
David Wheeler wrote: > On Apr 11, 2006, at 02:23, Randy W. Sims wrote: > >> Another options would be to require the user to flag the default if it >> is not in the options list. In effect, the user must declare she knows >> the string entered is not in the options and that she knows exactly >> what she's doing. > > Yeah, that'd be okay. > >> $answer = Prompter->ask( >> prompt => "What is your user name?\n", >> default => '!guest', >> ); >> >> (The first character of the default string is an exclamation mark.) > > Why use a mini-language? Why not just another parameter? > > yes_i_know_default_isnt_in_options => 1, Ok, I think I'm having one of those "what was I thinking (or drinking)?" moments. Yep, feeling rather foolish now. Any ideas on how to best abbreviate 'yes_i_know_default_isnt_in_options'? allow_nonoption_default allow_odd_default I'm going to try my best to get this one wrapped up and committed tonight, possibly including some of the mentioned extensions. Randy. |