EFA/Route/Message.pm

filter: Statementstmt 84.0% 21 / 25 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 50.0% 1 / 2 totaltotal 78.3% 29 / 37 CC 3 SCAR 6.6
CC
3
Cov
79%
new
3.1
TO_JSON
2.0
BEGIN
1.0
CRAP 1.9
« EFA/Route/Part.pm ↑ Summary EFA/Route.pm »
1 package Travel::Routing::DE::EFA::Route::Message;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 ▶use parent 'Class::Accessor';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 our $VERSION = '2.25';
10  
11 2 Travel::Routing::DE::EFA::Route::Message->mk_ro_accessors(
12 qw(is_detailed summary subject subtitle raw_content));
13  
14 5 ▶sub new {
Subroutine new: called CC=3 SCAR=11.4
Pod documented
15 5 my ( $obj, %conf ) = @_;
16  
17 5 my $ref = \%conf;
18  
19 5 ▶ if ( not defined $ref->{subject} ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $ref->{"subject"}) 5 0 5
20 5 $ref->{subject} = $ref->{summary};
21 }
22  
23 5 ▶ if ( defined $ref->{raw_content} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $ref->{'raw_content'}) { } 0 5 5
24 0 $ref->{is_detailed} = 1;
25 }
26 else {
27 5 $ref->{is_detailed} = 0;
28 }
29  
30 5 return bless( $ref, $obj );
31 }
32  
33 0 ▶sub TO_JSON {
Subroutine TO_JSON: not called CC=1 SCAR=6.9
Pod undocumented
34 0 my ($self) = @_;
35  
36 0 return { %{$self} };
37 }
38  
39 2 1;
40  
41 __END__
« EFA/Route/Part.pm ↑ Summary EFA/Route.pm »