File Coverage

blib/lib/WebService/PivotalTracker/Person.pm
Criterion Covered Total %
statement 18 19 94.7
branch n/a
condition n/a
subroutine 6 7 85.7
pod n/a
total 24 26 92.3


line stmt bran cond sub pod time code
1             package WebService::PivotalTracker::Person;
2              
3 1     1   6 use strict;
  1         2  
  1         30  
4 1     1   4 use warnings;
  1         2  
  1         25  
5 1     1   5 use namespace::autoclean;
  1         2  
  1         8  
6              
7             our $VERSION = '0.12';
8              
9 1     1   76 use WebService::PivotalTracker::PropertyAttributes;
  1         2  
  1         47  
10             use WebService::PivotalTracker::Types
11 1     1   6 qw( ArrayRef Bool DateTimeObject NonEmptyStr PositiveInt );
  1         1  
  1         10  
12              
13 1     1   1672 use Moo;
  1         2  
  1         6  
14              
15             has( @{$_} ) for props_to_attributes(
16             id => PositiveInt,
17             name => NonEmptyStr,
18             initials => NonEmptyStr,
19             username => NonEmptyStr,
20             kind => NonEmptyStr,
21             );
22              
23             with 'WebService::PivotalTracker::Entity';
24              
25             ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines)
26             sub _self_uri {
27 0     0     die 'Me has no uri';
28             }
29             ## use critic
30              
31             1;
32              
33             # ABSTRACT: A Person (a PT user)
34              
35             __END__
36              
37             =pod
38              
39             =encoding UTF-8
40              
41             =head1 NAME
42              
43             WebService::PivotalTracker::Person - A Person (a PT user)
44              
45             =head1 VERSION
46              
47             version 0.12
48              
49             =head1 SYNOPSIS
50              
51             =head1 DESCRIPTION
52              
53             This class represents a person.
54              
55             =for Test::Synopsis my $pt;
56              
57             my $requester = $pt->story( story_id => 42 )->requested_by;
58              
59             =head1 ATTRIBUTES
60              
61             This class provides the following attribute accessor methods. Each one
62             corresponds to a property defined by the L<PT REST API V5 me resource
63             docs|https://www.pivotaltracker.com/help/api/rest/v5#me_resource>.
64              
65             =head2 id
66              
67             =head2 name
68              
69             =head2 initials
70              
71             =head2 username
72              
73             =head2 kind
74              
75             =head2 raw_content
76              
77             The raw JSON used to create this object.
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