Mojo/Feed/Item/Enclosure.pm

filter: Statementstmt 85.0% 17 / 20 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 6 / 9 Podpod 100% 2 / 2 totaltotal 81.8% 27 / 33 CC 2 SCAR 4.1
CC
2
Cov
86%
__ANON__
2.0
__ANON__
2.0
__ANON__
2.0
CRAP 1.5
« Mojo/Feed/Item.pm ↑ Summary
1 package Mojo::Feed::Item::Enclosure;
2 13 ▶use Mojo::Base -base;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 use overload
5 0 ▶ bool => sub {1},
Subroutine BEGIN: called CC=1 SCAR=0.6
Subroutine __ANON__: not called CC=1 SCAR=6.9
6 0 ▶ '""' => sub { shift->to_string },
Subroutine __ANON__: not called CC=1 SCAR=6.9
7 13 fallback => 1;
8  
9  
10 13 has 'dom';
11  
12 14 ▶has length => sub { shift->dom->attr('length'); };
Subroutine __ANON__: called CC=1 SCAR=0.0
13 14 ▶has type => sub { shift->dom->attr('type'); };
Subroutine __ANON__: called CC=1 SCAR=0.0
14 14 ▶has url => sub { my $attr = shift->dom->attr; $attr->{url} || $attr->{href} };
Subroutine __ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
$attr->{"url"} or $attr->{"href"} 8 6 14
15  
16 14 ▶sub to_hash {
Subroutine to_hash: called CC=1 SCAR=0.0
Pod documented
17 14 return {map { $_ => $_[0]->$_ } (qw(length type url))};
18 }
19  
20 0 ▶sub to_string {
Subroutine to_string: not called CC=1 SCAR=6.9
Pod documented
21 0 shift->dom->to_string;
22 }
23  
24 13 1;
25  
26 __END__
« Mojo/Feed/Item.pm ↑ Summary