Skip Menu |

This queue is for tickets about the Term-Prompt CPAN distribution.

Report information
The Basics
Id: 3065
Status: open
Priority: 0/
Queue: Term-Prompt

People
Owner: Nobody in particular
Requestors: kevin.ruscoe [...] ubs.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.11
Fixed in: (no value)



Subject: RFE to Term::Prompt: should be possible to require user to answer
Hi Allen Just tried using Term::Prompt for the first time and it works fine :-) (I was previously using my own code for this and have started to replace it with yours.) There is one feature which I was using in my own code that appears to be missing from Term::Prompt. I would like to be able to specify that the user be required to answer certain questions. There are two parts to this: 1) It should be possible to specify that an empty response (i.e. user just hits newline) is not acceptable. In that instance, the user should be asked to answer the question again. It would also be nice to set a limit on the number of times the user is asked before an exception is thrown. 2) (This would be especially useful for y/n questions.) Answers which do not match the list of legal answer should behave as in 1) (i.e. the user should be asked to try again). As for the API, perhaps an undefined default parameter could indicate a required answer. I am using Perl v5.8.0. Cheers Kevin
From: Kevin
[KRUSCOE - Mon Jul 28 08:43:23 2003]: Show quoted text
> Hi Allen > > Just tried using Term::Prompt for the first time and it works fine :-) > (I was previously using my own code for this and have started to > replace it with yours.) > > There is one feature which I was using in my own code that appears to > be missing from Term::Prompt. I would like to be able to specify > that the user be required to answer certain questions. There are > two parts to this: > > 1) It should be possible to specify that an empty response (i.e. user > just hits newline) is not acceptable. In that instance, the user > should be asked to answer the question again. It would also be > nice to set a limit on the number of times the user is asked before > an exception is thrown. > > 2) (This would be especially useful for y/n questions.) Answers which > do not match the list of legal answer should behave as in 1) (i.e. > the user should be asked to try again). > > As for the API, perhaps an undefined default parameter could indicate > a required answer. > > I am using Perl v5.8.0. > > Cheers > Kevin
-- Kevin Ruscoe e-mail: Kevin.Ruscoe@ubsw.com --------------JAPH------------- #!/usr/bin/env perl -w $"="";print"@{[&{sub{($i,$j,@_)=(1,1,split//, 'hrP kc eeatenltarohsr u.J');while(@_){for(1..$i) {@_=(pop,@_)}push@t,shift;($i,$j)=($i+$j,$i)}@t}}]}\n"; __END__ +ANYTHING+BELOW+WAS+ADDED+AFTER+I+HIT+SEND+
From: Kevin
Please ignore this RFE. This is already possible in Term::Prompt (I should have read the docs more carefully!). Regards Kevin
Closed, per previous comment.
On Fri Nov 26 12:12:48 2010, DOHERTY wrote: Show quoted text
> Closed, per previous comment.
Or not. RT won't let me.