NewsML_G2/Writer/Concept_Item.pm

filter: Statementstmt 100% 30 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 37 / 37 CC 2 SCAR 2.2
CC
2
Cov
100%
_create_content_meta
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« NewsML_G2/Concept.pm ↑ Summary NewsML_G2/Types.pm »
1 package XML::NewsML_G2::Writer::Concept_Item;
2  
3 22 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 22 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 22 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 22 extends 'XML::NewsML_G2::Writer::Substancial_Item';
8  
9 22 has '+_root_node_name', default => 'conceptItem';
10 22 has '+_nature_qcode_prefix', default => 'cinat';
11  
12 2 ▶sub _create_rights_info {
Subroutine _create_rights_info: called CC=1 SCAR=0.0
13 }
14  
15 2 ▶sub _create_subjects {
Subroutine _create_subjects: called CC=1 SCAR=0.0
16 2 my $self = shift;
17 2 my @res;
18 2 push @res, $self->_create_subjects_media_topic();
19 2 push @res, $self->_create_subjects_concepts();
20 2 return @res;
21 }
22  
23 2 ▶sub _create_content_meta {
Subroutine _create_content_meta: called CC=2 SCAR=6.9
24 2 my ( $self, $root ) = @_;
25  
26 2 $root->appendChild( my $cm = $self->create_element('contentMeta') );
27 2 my @subjects = $self->_create_subjects();
28 2 $cm->appendChild($_) foreach (@subjects);
29 2 return;
30 }
31  
32 2 ▶sub _create_content {
Subroutine _create_content: called CC=1 SCAR=0.0
33 2 my ( $self, $root ) = @_;
34  
35 2 $root->appendChild( my $concept = $self->create_element('concept') );
36 2 $concept->appendChild( $self->_create_id_element() );
37 2 $concept->appendChild( $self->_create_type_element() );
38 2 $self->_create_inner_content($concept);
39  
40 2 return;
41 }
42  
43 22 __PACKAGE__->meta->make_immutable;
44  
45 22 1;
46  
47 __END__
« NewsML_G2/Concept.pm ↑ Summary NewsML_G2/Types.pm »