Media/Group.pm

filter: Statementstmt 88.8% 16 / 18 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 2 / 2 totaltotal 85.1% 23 / 27 CC 3 SCAR 7.4
CC
3
Cov
85%
default_content
3.2
element_name
2.0
BEGIN
1.0
CRAP 2.1
↑ Summary Media/Content.pm »
1 package XML::Atom::Ext::Media::Group;
2 2 our $VERSION = '0.092840';
3  
4  
5 #ABSTRACT: Represents <media:grouÄ> elements
6  
7 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 ▶use base qw( XML::Atom::Ext::Media::Base );
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12  
13 2 __PACKAGE__->mk_object_list_accessor(
14 content => 'XML::Atom::Ext::Media::Content', 'contents'
15 );
16  
17  
18 1 ▶sub default_content {
Subroutine default_content: called CC=3 SCAR=11.7
Pod documented
19 1 my ($self) = @_;
20
21 1 my @contents = $self->contents;
22 1 foreach (@contents) {
23 1 ▶ return $_ if $_->isDefault;
Branch: 1 branch
BranchTrueFalseTotal
if $_->isDefault 1 0 1
24 }
25 # Fallback to the first one
26 0 return $contents[0];
27 }
28 0 ▶sub element_name {
Subroutine element_name: not called CC=1 SCAR=6.9
Pod documented
29 0 return 'group';
30 }
31  
32 2 1;
33  
34  
35 __END__
↑ Summary Media/Content.pm »