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