blib/lib/Cikl/Models/AddressRole.pm

filter: Statementstmt 79.1% 19 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod 0.0% 0 / 4 totaltotal 66.6% 24 / 36 CC 1 SCAR 3.2
CC
1
Cov
79%
as_string
2.0
to_hash
2.0
normalize_value
2.0
CRAP 1.4
« blib/lib/Cikl/Smrt/Fetcher.pm ↑ Summary blib/lib/Cikl/DataTypes/Integer.pm »
1 package Cikl::Models::AddressRole;
2 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use Mouse::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 7 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 7 requires 'type';
8  
9 7 has 'value' => (
10 is => 'rw',
11 isa => 'Str',
12 required => 1
13 );
14  
15 0 ▶sub as_string {
Subroutine as_string: not called CC=1 SCAR=6.9
Pod undocumented
16 0 my $self = shift;
17 0 return $self->value;
18 }
19  
20 0 ▶sub to_hash {
Subroutine to_hash: not called CC=1 SCAR=6.9
Pod undocumented
21 0 return { $_[0]->type => $_[0]->value };
22 }
23  
24 0 ▶sub normalize_value {
Subroutine normalize_value: not called CC=1 SCAR=6.9
Pod undocumented
25 0 my $class = shift;
26 0 return shift;
27 }
28  
29 18 ▶sub new_normalized {
Subroutine new_normalized: called CC=1 SCAR=0.0
Pod undocumented
30 18 my $class = shift;
31 18 my %args = @_;
32 18 $args{value} = $class->normalize_value($args{value});
33 18 $class->new(%args);
34 }
35  
36  
37 7 1;
« blib/lib/Cikl/Smrt/Fetcher.pm ↑ Summary blib/lib/Cikl/DataTypes/Integer.pm »