File Coverage

blib/lib/Bootylicious/ArticleArchive.pm
Criterion Covered Total %
statement 19 19 100.0
branch 2 2 100.0
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 28 28 100.0


line stmt bran cond sub pod time code
1             package Bootylicious::ArticleArchive;
2              
3 5     5   518 use strict;
  5         7  
  5         117  
4 5     5   16 use warnings;
  5         7  
  5         100  
5              
6 5     5   16 use base 'Mojo::Base';
  5         5  
  5         306  
7              
8 5     5   1630 use Bootylicious::ArticleArchiveYearly;
  5         9  
  5         37  
9 5     5   1751 use Bootylicious::ArticleArchiveMonthly;
  5         9  
  5         20  
10              
11             __PACKAGE__->attr('articles');
12             __PACKAGE__->attr('year');
13             __PACKAGE__->attr('month');
14              
15             sub new {
16 7     7 1 26 my $self = shift->SUPER::new(@_);
17              
18 7 100       51 if ($self->month) {
19 2         31 return Bootylicious::ArticleArchiveMonthly->new(@_);
20             }
21              
22 5         49 return Bootylicious::ArticleArchiveYearly->new(@_);
23             }
24              
25             1;