line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bootylicious::ArticleArchiveMonthly; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
27
|
use strict; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
114
|
|
4
|
5
|
|
|
5
|
|
20
|
use warnings; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
101
|
|
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
|
22
|
use base 'Bootylicious::ArticleArchiveBase'; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
315
|
|
7
|
|
|
|
|
|
|
|
8
|
5
|
|
|
5
|
|
315
|
use Bootylicious::IteratorSearchable; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
30
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
__PACKAGE__->attr('month'); |
11
|
|
|
|
|
|
|
__PACKAGE__->attr('iterator'); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub build { |
14
|
2
|
|
|
2
|
0
|
4
|
my $self = shift; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my $iterator = Bootylicious::IteratorSearchable->new($self->articles)->find_all( |
17
|
|
|
|
|
|
|
sub { |
18
|
4
|
|
|
4
|
|
19
|
my ($iterator, $article) = @_; |
19
|
|
|
|
|
|
|
|
20
|
4
|
|
|
|
|
14
|
my $year = $article->created->year; |
21
|
4
|
|
|
|
|
221
|
my $month = $article->created->month; |
22
|
|
|
|
|
|
|
|
23
|
4
|
100
|
66
|
|
|
238
|
return if $self->year && $self->year != $year; |
24
|
3
|
100
|
66
|
|
|
39
|
return if $self->month && $self->month != $month; |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
31
|
return $article; |
27
|
|
|
|
|
|
|
} |
28
|
2
|
|
|
|
|
11
|
); |
29
|
|
|
|
|
|
|
|
30
|
2
|
|
|
|
|
19
|
$self->articles($iterator); |
31
|
|
|
|
|
|
|
|
32
|
2
|
|
|
|
|
20
|
return $self; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
1
|
|
|
1
|
0
|
12
|
sub is_monthly {1} |
36
|
1
|
|
|
1
|
0
|
14
|
sub is_yearly {0} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |