line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
########################################### |
2
|
|
|
|
|
|
|
package Gaim::Log::Message; |
3
|
|
|
|
|
|
|
########################################### |
4
|
3
|
|
|
3
|
|
19
|
use strict; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
370
|
|
5
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
106
|
|
6
|
3
|
|
|
3
|
|
15
|
use DateTime; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
63
|
|
7
|
3
|
|
|
3
|
|
9926
|
use DateTime::Format::Strptime; |
|
3
|
|
|
|
|
534464
|
|
|
3
|
|
|
|
|
291
|
|
8
|
3
|
|
|
3
|
|
45
|
use Log::Log4perl qw(:easy); |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
57
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our @ACCESSORS = qw(from to protocol date content); |
11
|
|
|
|
|
|
|
our $VERSION = "0.04"; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
########################################### |
14
|
|
|
|
|
|
|
sub new { |
15
|
|
|
|
|
|
|
########################################### |
16
|
25
|
|
|
25
|
0
|
260
|
my($class, %options) = @_; |
17
|
|
|
|
|
|
|
|
18
|
25
|
|
|
|
|
101
|
my $self = { |
19
|
|
|
|
|
|
|
%options, |
20
|
|
|
|
|
|
|
}; |
21
|
|
|
|
|
|
|
|
22
|
25
|
|
|
|
|
109
|
$class->make_accessor($_) for @ACCESSORS; |
23
|
|
|
|
|
|
|
|
24
|
25
|
|
|
|
|
326
|
bless $self, $class; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
################################################## |
28
|
|
|
|
|
|
|
sub make_accessor { |
29
|
|
|
|
|
|
|
################################################## |
30
|
125
|
|
|
125
|
0
|
168
|
my($package, $name) = @_; |
31
|
|
|
|
|
|
|
|
32
|
3
|
|
|
3
|
|
4490
|
no strict qw(refs); |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
1130
|
|
33
|
|
|
|
|
|
|
|
34
|
125
|
|
|
|
|
336
|
my $code = <
|
35
|
|
|
|
|
|
|
*{"$package\\::$name"} = sub { |
36
|
|
|
|
|
|
|
my(\$self, \$value) = \@_; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
if(defined \$value) { |
39
|
|
|
|
|
|
|
\$self->{$name} = \$value; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
if(exists \$self->{$name}) { |
42
|
|
|
|
|
|
|
return (\$self->{$name}); |
43
|
|
|
|
|
|
|
} else { |
44
|
|
|
|
|
|
|
return ""; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
EOT |
48
|
125
|
100
|
|
|
|
122
|
if(! defined *{"$package\::$name"}) { |
|
125
|
|
|
|
|
634
|
|
49
|
15
|
50
|
|
14
|
|
2970
|
eval $code or die "$@"; |
|
14
|
50
|
|
|
|
1557
|
|
|
14
|
50
|
|
|
|
37
|
|
|
0
|
50
|
|
|
|
0
|
|
|
14
|
50
|
|
|
|
36
|
|
|
14
|
50
|
|
|
|
57
|
|
|
0
|
50
|
|
|
|
0
|
|
|
4
|
50
|
|
|
|
9
|
|
|
4
|
50
|
|
|
|
17
|
|
|
0
|
50
|
|
|
|
0
|
|
|
4
|
50
|
|
|
|
13
|
|
|
4
|
|
|
|
|
18
|
|
|
0
|
|
|
|
|
0
|
|
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
15
|
|
|
0
|
|
|
|
|
0
|
|
|
4
|
|
|
|
|
19
|
|
|
4
|
|
|
|
|
18
|
|
|
0
|
|
|
|
|
0
|
|
|
19
|
|
|
|
|
897
|
|
|
19
|
|
|
|
|
53
|
|
|
0
|
|
|
|
|
0
|
|
|
19
|
|
|
|
|
49
|
|
|
19
|
|
|
|
|
89
|
|
|
0
|
|
|
|
|
0
|
|
|
19
|
|
|
|
|
373
|
|
|
19
|
|
|
|
|
50
|
|
|
0
|
|
|
|
|
0
|
|
|
19
|
|
|
|
|
47
|
|
|
19
|
|
|
|
|
70
|
|
|
0
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
########################################### |
54
|
|
|
|
|
|
|
sub as_string { |
55
|
|
|
|
|
|
|
########################################### |
56
|
0
|
|
|
0
|
1
|
|
my($self) = @_; |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
return "$self->{from} =($self->{protocol})=> $self->{to}: [" . |
59
|
|
|
|
|
|
|
scalar(localtime($self->{date})) . "] [$self->{content}]"; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
1; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
__END__ |