[Module::Build] ask() and you will receive
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <Ra...@Th...> - 2006-04-08 10:34:08
|
Attached is version of the ask() routine discussed earlier to supersede
or augment prompt() and y_n(), including pod. I extracted it directly
out of my working copy of MB and put it in its own package to make it
easier to demo for feedback. It would go in MB along with prompt() and
y_n() if we decide to use it.
Here is a sample driver:
use Prompter;
my $answer;
$answer = Prompter->ask(
prompt => "What is your favorite programming language?\n",
options => [qw(Perl Ruby Lua Python C C++)],
default => 'unknown',
show_options => 1,
show_default => 0,
);
print "Answer: $answer\n";
__END__
Please see `perldoc Prompter.pm` for docs.
Randy.
|