line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::OICQ::ClientEvent; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# $Id: ClientEvent.pm,v 1.1 2007/01/02 21:08:52 tans Exp $ |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# Copyright (c) 2003 - 2006 Shufeng Tan. All rights reserved. |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# This package is free software and is provided "as is" without express |
8
|
|
|
|
|
|
|
# or implied warranty. It may be used, redistributed and/or modified |
9
|
|
|
|
|
|
|
# under the terms of the Perl Artistic License (see |
10
|
|
|
|
|
|
|
# http://www.perl.com/perl/misc/Artistic.html) |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
36
|
|
13
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
5256
|
|
|
1
|
|
|
|
|
52
|
|
14
|
1
|
|
|
1
|
|
9
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
82
|
|
15
|
1
|
|
|
1
|
|
736
|
use Net::OICQ::Event; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
186
|
|
16
|
1
|
|
|
1
|
|
6
|
eval "no encoding; use bytes;" if $] >= 5.008; |
|
1
|
|
|
1
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
55
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our @ISA = qw(Net::OICQ::Event); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
21
|
0
|
|
|
0
|
0
|
|
my ($class, $header, $data, $oicq) = @_; |
22
|
0
|
0
|
|
|
|
|
croak "Error: OICQ object missing for new ClientEvent" unless defined($oicq); |
23
|
0
|
|
|
|
|
|
my $self = { |
24
|
|
|
|
|
|
|
Time => time(), |
25
|
|
|
|
|
|
|
OICQ => $oicq, |
26
|
|
|
|
|
|
|
Header => $header, |
27
|
|
|
|
|
|
|
Data => $data |
28
|
|
|
|
|
|
|
}; |
29
|
0
|
|
|
|
|
|
bless $self, $class; |
30
|
0
|
|
|
|
|
|
$self->process; |
31
|
0
|
|
|
|
|
|
return $self; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub uid { |
35
|
0
|
|
|
0
|
0
|
|
substr(shift->{Header}, 7, 4) |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1 |