bless 概念

来源:互联网 发布:get 软件 自营 编辑:程序博客网 时间:2024/04/29 11:12
<pre name="code" class="sql">bless 以一个普通的指向数据结构的引用参数。它将会把那个数据结构(注意,不是引用本身)标记为属于某个特定的包,于是这样就赋予了它更强大的功能。$VAR1 = bless( {                 'ChatRoomName' => 'xx',                 'FromId' => '@7a22e69a81cf62530b15f8e7e841d0e6',                 'Type' => 'chatroom_message',                 'MsgType' => 'text',                 'ChatRoomUin' => 0,                 'FromUin' => 265934395,                 'TTL' => 5,                 'ToId' => '@97e34894afab67639895cf602c047a409dabe1e1a464257577936bb9419444bd',                 'ToUin' => 164192082,                 'MsgClass' => 'recv',                 'ChatRoomId' => '@@9b3ab7beb8fd62a3ca10f5488c043e909e7e487a358765846427dbdce75df0cf',                 'CreateTime' => 1451976072,                 'ToNickName' => '我',                 'FromRemarkName' => undef,                 'ToRemarkName' => undef,                 'FromNickName' => 'Live',                 'Content' => '温金 138xx851720',                 'MsgId' => '4126696994516150912'               }, 'Weixin::Message::Recv' );1-msg---------


                                             
0 0