Re: run an interactive command using POE::Wheel?

Olivier Mengué <[email protected]>
Newsgroups gmane.comp.lang.perl.poe
Message-ID <[email protected]>
2009/9/25 woosley. xu. <[email protected]>

> besides, if you write the interactive code like this:
>
>    my $user = <STDIN>;
>    chomp $user;
>    $_[HEAP]->{job}->put("$user");
>    my $pass = <STDIN>;
>    chomp $pass;
>    $_[HEAP]->{job}->put("$pass");
>
> It won't pop up all the message from the child process until you finished
> all your input. Maybe this is not the right way to do it, I am wondering
> which is the way.
>
> You should do user input in the POE way too: by watching events coming from
STDIN.
Maybe POE::Wheel::ReadLine is what you need.

Olivier.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.