NewsML_G2/Types.pm

filter: Statementstmt 86.8% 33 / 38 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 72.7% 8 / 11 Podpod n/a totaltotal 83.6% 41 / 49 CC 1 SCAR 1.8
CC
1
Cov
87%
__ANON__
2.0
__ANON__
2.0
__ANON__
1.1
CRAP 1.2
« NewsML_G2/Writer/Concept_Item.pm ↑ Summary NewsML_G2/AnyItem.pm »
1 package XML::NewsML_G2::Types;
2  
3 40 ▶use Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 40 ▶use Module::Runtime 'use_module';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 40 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 40 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 40 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 40 enum 'XML::NewsML_G2::Types::Nature',
11 [qw(text picture graphics audio video composite concept)];
12  
13 40 enum 'XML::NewsML_G2::Types::Group_Mode', [qw(bag sequential alternative)];
14  
15 40 class_type 'XML::NewsML_G2::Link';
16 coerce 'XML::NewsML_G2::Link', from 'Str',
17 27 ▶ via { use_module('XML::NewsML_G2::Link')->new( residref => $_ ) };
Subroutine __ANON__: called CC=1 SCAR=0.0
18  
19 40 class_type 'XML::NewsML_G2::Destination';
20 coerce 'XML::NewsML_G2::Destination', from 'Str',
21 0 ▶ via { use_module('XML::NewsML_G2::Destination')->new( name => $_ ) };
Subroutine __ANON__: not called CC=1 SCAR=1.2
22  
23 40 subtype 'XML::NewsML_G2::ArrayRefOfLinks',
24 as 'ArrayRef[XML::NewsML_G2::Link]';
25 0 ▶coerce 'XML::NewsML_G2::ArrayRefOfLinks', from 'ArrayRef[HashRef]', via {
Subroutine __ANON__: not called CC=1 SCAR=6.9
26 0 [ map { XML::NewsML_G2::Link->new($_) } @$_ ]
27 40 };
28  
29 40 class_type 'XML::NewsML_G2::Creator';
30 coerce 'XML::NewsML_G2::Creator', from 'Str',
31 85 ▶ via { use_module('XML::NewsML_G2::Creator')->new( name => $_ ) };
Subroutine __ANON__: called CC=1 SCAR=0.0
32 40 subtype 'XML::NewsML_G2::ArrayRefOfCreators',
33 as 'ArrayRef[XML::NewsML_G2::Creator]';
34 0 ▶coerce 'XML::NewsML_G2::ArrayRefOfCreators', from 'ArrayRef[Str]', via {
Subroutine __ANON__: not called CC=1 SCAR=6.9
35 0 [ map { XML::NewsML_G2::Creator->new( name => $_ ) } @$_ ]
36 40 };
37  
38 40 class_type 'XML::NewsML_G2::Translatable_Text';
39 coerce 'XML::NewsML_G2::Translatable_Text', from 'Str',
40 4 ▶ via { use_module('XML::NewsML_G2::Translatable_Text')->new( text => $_ ) };
Subroutine __ANON__: called CC=1 SCAR=0.0
41  
42 40 1;
43 __END__
« NewsML_G2/Writer/Concept_Item.pm ↑ Summary NewsML_G2/AnyItem.pm »