Picnic/Result/Categories.pm

filter: Statementstmt 100% 14 / 14 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 2 / 2 totaltotal 95.4% 21 / 22 CC 2 SCAR 3.8
CC
2
Cov
94%
__ANON__
2.1
BEGIN
1.0
all_categories
1.0
CRAP 1.5
« Picnic/Result/User.pm ↑ Summary Picnic/Result/DeliverySlot.pm »
1 package WWW::Picnic::Result::Categories;
2 # ABSTRACT: Collection of Picnic store categories
3 2 our $VERSION = '0.101';
4 2 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 extends 'WWW::Picnic::Result';
7  
8  
9 has catalog => (
10 is => 'ro',
11 lazy => 1,
12 1 ▶ default => sub { shift->_get('catalog') || [] },
Subroutine __ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
(shift())->_get("catalog") or [] 1 0 1
13 2 );
14  
15  
16 1 ▶sub all_categories {
Subroutine all_categories: called CC=1 SCAR=0.0
Pod documented
17 1 my ( $self ) = @_;
18 1 return @{ $self->catalog };
19 }
20  
21  
22 1 ▶sub total_count {
Subroutine total_count: called CC=1 SCAR=0.0
Pod documented
23 1 my ( $self ) = @_;
24 1 return scalar @{ $self->catalog };
25 }
26  
27  
28 2 1;
29  
30 __END__
« Picnic/Result/User.pm ↑ Summary Picnic/Result/DeliverySlot.pm »