| 1 | package Bootylicious::ArticleArchiveMonthly; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 2 | ▶ | use base 'Bootylicious::ArticleArchiveBase'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 2 | ▶ | use Bootylicious::IteratorSearchable; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 2 | __PACKAGE__->attr('month'); | |||||||||||||||||||||||||||
| 11 | 2 | __PACKAGE__->attr('iterator'); | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | sub build { | ||||||||||||||||||||||||||||
| 14 | 1 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
build: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | my $iterator = Bootylicious::IteratorSearchable->new($self->articles)->find_all( | ||||||||||||||||||||||||||||
| 17 | sub { | ||||||||||||||||||||||||||||
| 18 | 3 | ▶ | my ($iterator, $article) = @_; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=5 SCAR=16.2
| |||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 3 | my $year = $article->created->year; | |||||||||||||||||||||||||||
| 21 | 3 | my $month = $article->created->month; | |||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 3 | ▶ | return if $self->year && $self->year != $year; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$self->year and $self->year != $year
MC/DC50%1/2
$self->year and $self->year != $year
$self->year
$self->year != $year
Truth table66%2/3
A and B
A= $self->yearB= $self->year != $year
| |||||||||||||||||||||||||||||
| 24 | 2 | ▶ | return if $self->month && $self->month != $month; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$self->month and $self->month != $month
MC/DC50%1/2
$self->month and $self->month != $month
$self->month
$self->month != $month
Truth table66%2/3
A and B
A= $self->monthB= $self->month != $month
| |||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | 1 | return $article; | |||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||
| 28 | 1 | ); | |||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | 1 | $self->articles($iterator); | |||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 1 | return $self; | |||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 1 | ▶ | sub is_monthly {1} | ||||||||||||||||||||||||||
|
Subroutine
is_monthly: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 36 | 0 | ▶ | sub is_yearly {0} | ||||||||||||||||||||||||||
|
Subroutine
is_yearly: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | 2 | 1; | |||||||||||||||||||||||||||