File Coverage

lib/Neo4j/Types/Generic/Duration.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition 2 2 100.0
subroutine 9 9 100.0
pod 4 5 100.0
total 33 34 100.0


line stmt bran cond sub pod time code
1 2     2   607 use v5.10.1;
  2         6  
2 2     2   11 use strict;
  2         3  
  2         48  
3 2     2   9 use warnings;
  2         3  
  2         186  
4              
5             package Neo4j::Types::Generic::Duration;
6             # ABSTRACT: Generic representation of a Neo4j temporal duration value
7             $Neo4j::Types::Generic::Duration::VERSION = '2.00';
8              
9 2     2   10 use parent 'Neo4j::Types::Duration';
  2         3  
  2         17  
10              
11              
12             sub new {
13             # uncoverable pod - see Generic.pod
14 2     2 0 41 my ($class, $params) = @_;
15            
16 2   100     39 $params->{$_} ||= 0 for qw( months days seconds nanoseconds );
17 2         23 return bless $params, __PACKAGE__;
18             }
19              
20              
21 2     2 1 27 sub months { shift->{months} }
22 2     2 1 14 sub days { shift->{days} }
23 2     2 1 34 sub seconds { shift->{seconds} }
24 2     2 1 14 sub nanoseconds { shift->{nanoseconds} }
25              
26              
27             1;