Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Welcome to the Monastery
 
PerlMonks  

Kwalitee and the prompt() method

by pokki (Scribe)
on Jan 01, 2011 at 14:03 UTC ( #879996=perlquestion: print w/ replies, xml ) Need Help??
pokki has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks,

This page on Kwalitee mentions the optional indicator "no_stdin_for_prompting":

no_stdin_for_prompting
Shortcoming: This distribution is using direct call from STDIN instead of prompt())
Remedy: Use the prompt() method

This seems to suggest that there is One True prompt method to be used. Poking around on CPAN gives me IO::Prompt and Term::Prompt, both of which define a prompt(). Should I use one of these? Which is recommended? Can I implement my own prompt()? (Probably shouldn't.) If it's called something else, will kwalitee tests nag me for using <STDIN> in that method?

Am I just nitpicking? A huge majority of distributions are complying to this, according to CPANTS -- maybe because most don't use STDIN anyway, directly or indirectly?

(I have no actual use case to present. This is just me being curious.)

Comment on Kwalitee and the prompt() method
Re: Kwalitee and the prompt() method
by moritz (Cardinal) on Jan 01, 2011 at 14:45 UTC

      Ohhh.

      Yeah, I was definitely looking in the wrong direction for this. Thanks for the clarification!

Re: Kwalitee and the prompt() method
by tinita (Parson) on Jan 01, 2011 at 14:51 UTC
    There is a prompt() method/function in ExtUtils::MakeMaker as well as in Module::Build and Module::Install (moritz explained what it is good for), so that the recommendation will work for whatever you use as an installer.

      Thanks as well!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://879996]
Approved by moritz
Front-paged by moritz
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (12)
As of 2014-04-23 18:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (551 votes), past polls