App-Cmd-Plugin-Prompt
view release on metacpan or search on metacpan
lib/App/Cmd/Plugin/Prompt.pm view on Meta::CPAN
#pod B<choices:> what to display after the prompt; default is
#pod either the 'default' parameter or nothing
#pod
#pod =item *
#pod
#pod B<no_valid_default:> do not test the 'default' parameter
#pod against the 'valid' coderef
#pod
#pod =item *
#pod
#pod B<invalid_default_error:> error message to throw when the
#pod 'default' parameter is not valid (does not pass the 'valid'
#pod coderef)
#pod
#pod =back
#pod
#pod =cut
sub prompt_str {
my ($plugin, $cmd, $message, $opt) = @_;
if ($opt->{default} && $opt->{valid} && ! $opt->{no_valid_default}) {
lib/App/Cmd/Plugin/Prompt.pm view on Meta::CPAN
B<choices:> what to display after the prompt; default is
either the 'default' parameter or nothing
=item *
B<no_valid_default:> do not test the 'default' parameter
against the 'valid' coderef
=item *
B<invalid_default_error:> error message to throw when the
'default' parameter is not valid (does not pass the 'valid'
coderef)
=back
=head2 prompt_yn
my $bool = prompt_yn($prompt, \%opt);
This prompts the user for a yes or no response and won't give up until it gets
( run in 0.350 second using v1.01-cache-2.11-cpan-496ff517765 )