加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

读-福瑞哈哥-的POE学习笔记

发布时间:2020-12-16 00:37:04 所属栏目:大数据 来源:网络整理
导读:http://bbs.chinaunix.net/thread-908855-1-1.html wheel部分有个小例子,代码不贴了。 其中有几行: ? ? ? ? # 告诉ReadLine监控终端 ? ? ? ? ? $console-get( 'input your message,bye to quit: '); ? ? ? ? ? $heap-{console} = $console; ? 原以为$conso

http://bbs.chinaunix.net/thread-908855-1-1.html

wheel部分有个小例子,代码不贴了。

其中有几行:

  1. ? ? ? ? # 告诉ReadLine监控终端
    ?
  2. ? ? ? ? $console->get( 'input your message,bye to quit: ');
    ?
  3. ? ? ? ? $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.

悲催啊。。。。。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读