PivotalTracker/Entity.pm

filter: Statementstmt 90.3% 28 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 90.0% 9 / 10 Podpod n/a totaltotal 90.2% 37 / 41 CC 1 SCAR 1.0
CC
1
Cov
90%
_refresh_raw_content
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« PivotalTracker/Person.pm ↑ Summary PivotalTracker/Types.pm »
1 package WebService::PivotalTracker::Entity;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our $VERSION = '0.12';
8  
9 1 ▶use DateTime::Format::RFC3339;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use URI;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 ▶use WebService::PivotalTracker::Types qw( ClientObject HashRef PTAPIObject );
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 1 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 1 requires '_self_uri';
17  
18 1 has _pt_api => (
19 is => 'ro',
20 isa => PTAPIObject,
21 init_arg => 'pt_api',
22 required => 1,
23 handles => ['_client'],
24 );
25  
26 1 has raw_content => (
27 is => 'rw',
28 writer => '_set_raw_content',
29 isa => HashRef,
30 required => 1,
31 );
32  
33 ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines)
34  
35 # The PT docs specify ISO8601 but the examples all seem to be RFC3339
36 # compliant.
37 2 ▶sub _inflate_iso8601_datetime {
Subroutine _inflate_iso8601_datetime: called CC=1 SCAR=0.0
38 2 return DateTime::Format::RFC3339->parse_datetime( $_[1] );
39 }
40  
41 1 ▶sub _inflate_uri {
Subroutine _inflate_uri: called CC=1 SCAR=0.0
42 1 return URI->new( $_[1] );
43 }
44  
45 0 ▶sub _refresh_raw_content {
Subroutine _refresh_raw_content: not called CC=1 SCAR=6.9
46 0 my $self = shift;
47  
48 0 $self->_set_raw_content( $self->_client->get( $self->_self_uri ) );
49  
50 0 return;
51 }
52  
53 ## use critic
54  
55 1 1;
56  
57 # ABSTRACT: A shared role for all PT resources
58  
59 __END__
« PivotalTracker/Person.pm ↑ Summary PivotalTracker/Types.pm »