line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::PivotalTracker::Entity; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
2238
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
5
|
1
|
|
|
1
|
|
6
|
use namespace::autoclean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.12'; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
113
|
use DateTime::Format::RFC3339; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
10
|
1
|
|
|
1
|
|
5
|
use URI; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
7
|
use WebService::PivotalTracker::Types qw( ClientObject HashRef PTAPIObject ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
1015
|
use Moo::Role; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
requires '_self_uri'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has _pt_api => ( |
19
|
|
|
|
|
|
|
is => 'ro', |
20
|
|
|
|
|
|
|
isa => PTAPIObject, |
21
|
|
|
|
|
|
|
init_arg => 'pt_api', |
22
|
|
|
|
|
|
|
required => 1, |
23
|
|
|
|
|
|
|
handles => ['_client'], |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
sub _inflate_iso8601_datetime { |
38
|
2
|
|
|
2
|
|
1361
|
return DateTime::Format::RFC3339->parse_datetime( $_[1] ); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub _inflate_uri { |
42
|
1
|
|
|
1
|
|
798
|
return URI->new( $_[1] ); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub _refresh_raw_content { |
46
|
0
|
|
|
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; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
# ABSTRACT: A shared role for all PT resources |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=pod |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=encoding UTF-8 |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 NAME |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
WebService::PivotalTracker::Entity - A shared role for all PT resources |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 VERSION |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
version 0.12 |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 DESCRIPTION |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
This role has no user-facing parts. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=for Pod::Coverage .* |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 SUPPORT |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Bugs may be submitted through L<https://github.com/maxmind/WebService-PivotalTracker/issues>. |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 AUTHOR |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
This software is Copyright (c) 2016 - 2020 by MaxMind, Inc. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
This is free software, licensed under: |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=cut |