http://bbs.chinaunix.net/thread-908855-1-1.html
wheel部分有个小例子,代码不贴了。
其中有几行:
- # 告诉ReadLine监控终端
- $console->get( 'input your message,bye to quit: ');
- $heap->{console} = $console;
原以为$console->get仅仅是终端输出,所以在copy脚本的时候就删掉了。结果怎么调代码都不回显,server端也收不到东西。
cpan上关于这个get函数的说明:
get
get() causes POE::Wheel::ReadLine to display a prompt and then wait for input. Input is not noticed unless get() has enabled the wheel's internal I/O watcher.
After get() is called,the next line of input or exception on the console will trigger an InputEvent
with the appropriate parameters. POE::Wheel::ReadLine will then enter an inactive state until get() is called again.
Calls to get() without an argument will preserve the current prompt. Calling get() with an argument before a whole line of input is received will change the prompt on the fly.
悲催啊。。。。。