Syndication/Source.pm

filter: Statementstmt 100% 19 / 19 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 50.0% 1 / 2 totaltotal 93.1% 27 / 29 SCAR 11.0
CC
3
Cov
96%
init
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« Syndication/Util.pm ↑ Summary Syndication/Generator.pm »
1 package XML::Atom::Syndication::Source;
2 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 3 ▶use base qw( XML::Atom::Syndication::Thing );
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 XML::Atom::Syndication::Source->mk_accessors('element', 'icon', 'logo');
7 3 XML::Atom::Syndication::Source->mk_accessors(
8 'XML::Atom::Syndication::Generator',
9 'generator');
10 3 XML::Atom::Syndication::Source->mk_accessors('XML::Atom::Syndication::Text',
11 'subtitle');
12  
13 3 ▶sub element_name { 'source' }
Subroutine element_name: called CC=1 SCAR=0.0
Pod documented
14  
15 # This is the init method in XML::Atom::Syndication::Object. Could do
16 # better.
17 sub init {
18 10 ▶ my $atom = shift;
Subroutine init: called CC=3 SCAR=11.0
Pod undocumented
19 10 ▶ my %param = @_ == 1 ? (Elem => $_[0]) : @_;
Branch: 1 branch
BranchTrueFalseTotal
@_ == 1 ? : 0 10 10
20 10 $atom->set_ns(\%param);
21 10 ▶ unless ($atom->{elem} = $param{Elem}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($atom->{"elem"} = $param{"Elem"}) 3 7 10
22 3 require XML::Elemental::Element;
23 3 $atom->{elem} = XML::Elemental::Element->new;
24 3 $atom->{elem}->name('{' . $atom->ns . '}' . $atom->element_name);
25 }
26 10 $atom;
27 }
28  
29 3 1;
30  
31 __END__
« Syndication/Util.pm ↑ Summary Syndication/Generator.pm »