in reply to Interactive prompts inside a test harness

Aye,
You could use either the Term::Readkey (a la cooked mode) or Term::Readline::Gnu (a la shadow_redisplay) to achieve the same goal. I think i meant to say, use either of the Term::Read* modules.

The reason i am inclined to using the cpan modules (and suggested likewise) is that their whole point of the existance of the CPAN modules is to help the perl user write portable code. It's all good shying away from CPAN modules, you almost always can write cleaner, shorter, faster code without them and with hacks using external utilities but that guarantees little as the end-user might not be running the OS you presume he is running, he/she also might not have those external utilities your code depends on. Another principal reason for using the modules is that debugging's so much more easier since you know exactly how the modules behave, you have access to the code, etc. It might be fair to say, it's never safe to make presumtions about arbitrary external conditions, take control and ensure _your_ code is guaranteed to run (anywhere and everywhere, hopefully).

20061109 Janitored by Corion: Added formatting, links, as per Writeup Formatting Tips

  • Comment on Re: Interactive prompts inside a test harness