line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::Stats::Record; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
26
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
4
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
198
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
$VERSION = '0.1'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
0
|
|
|
0
|
0
|
|
my $class = shift; |
11
|
0
|
|
|
|
|
|
my $this = { |
12
|
|
|
|
|
|
|
MESSAGES => 0, # Number of messages |
13
|
|
|
|
|
|
|
STATUS => { |
14
|
|
|
|
|
|
|
R => 0, |
15
|
|
|
|
|
|
|
}, # Hash of statuses |
16
|
|
|
|
|
|
|
PARSED => 0, # Has this been parsed yet? |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
return bless $this, $class; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub num_read { |
23
|
0
|
|
|
0
|
0
|
|
my $this = shift; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
return $this->{STATUS}->{R}; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub num_unread { |
29
|
0
|
|
|
0
|
0
|
|
my $this = shift; |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
return $this->{MESSAGES} - $this->{STATUS}->{R}; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub num_status { |
35
|
0
|
|
|
0
|
0
|
|
my ($this, $status) = @_; |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
return $this->{STATUS}->{$status}; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub num_not_status { |
41
|
0
|
|
|
0
|
0
|
|
my ($this, $status) = @_; |
42
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
return $this->{MESSAGES} - $this->{STATUS}->{$status}; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__END__ |