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 CC 3 SCAR 6.9
CC
3
Cov
96%
init
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« Syndication/Util.pm ↑ Summary Syndication/Generator.pm »
1 package XML::Atom::Syndication::Source;
2 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 4 ▶use base qw( XML::Atom::Syndication::Thing );
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 4 XML::Atom::Syndication::Source->mk_accessors('element', 'icon', 'logo');
7 4 XML::Atom::Syndication::Source->mk_accessors(
8 'XML::Atom::Syndication::Generator',
9 'generator');
10 4 XML::Atom::Syndication::Source->mk_accessors('XML::Atom::Syndication::Text',
11 'subtitle');
12  
13 4 ▶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 11 ▶sub init {
Subroutine init: called CC=3 SCAR=11.0
Pod undocumented
18 11 my $atom = shift;
19 11 ▶ my %param = @_ == 1 ? (Elem => $_[0]) : @_;
Branch: 1 branch
BranchTrueFalseTotal
@_ == 1 ? : 0 11 11
20 11 $atom->set_ns(\%param);
21 11 ▶ unless ($atom->{elem} = $param{Elem}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($atom->{"elem"} = $param{"Elem"}) 3 8 11
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 11 $atom;
27 }
28  
29 4 1;
30  
31 __END__
« Syndication/Util.pm ↑ Summary Syndication/Generator.pm »