| 1 | package Mail::Stats::Record; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 1 | ▶ | use vars qw($VERSION); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 1 | $VERSION = '0.1'; | |
| 8 | |||
| 9 | 0 | ▶ | sub new { |
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 10 | 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 | 0 | ▶ | sub num_read { |
|
Subroutine
num_read: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 23 | 0 | my $this = shift; | |
| 24 | |||
| 25 | 0 | return $this->{STATUS}->{R}; | |
| 26 | } | ||
| 27 | |||
| 28 | 0 | ▶ | sub num_unread { |
|
Subroutine
num_unread: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 29 | 0 | my $this = shift; | |
| 30 | |||
| 31 | 0 | return $this->{MESSAGES} - $this->{STATUS}->{R}; | |
| 32 | } | ||
| 33 | |||
| 34 | 0 | ▶ | sub num_status { |
|
Subroutine
num_status: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 35 | 0 | my ($this, $status) = @_; | |
| 36 | |||
| 37 | 0 | return $this->{STATUS}->{$status}; | |
| 38 | } | ||
| 39 | |||
| 40 | 0 | ▶ | sub num_not_status { |
|
Subroutine
num_not_status: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 41 | 0 | my ($this, $status) = @_; | |
| 42 | |||
| 43 | 0 | return $this->{MESSAGES} - $this->{STATUS}->{$status}; | |
| 44 | } | ||
| 45 | |||
| 46 | 1 | 1; | |
| 47 | |||
| 48 | __END__ | ||