File Coverage

lib/JIRA/REST/Class/Issue/Changelog/Change.pm
Criterion Covered Total %
statement 11 17 64.7
branch n/a
condition n/a
subroutine 4 5 80.0
pod 1 1 100.0
total 16 23 69.5


line stmt bran cond sub pod time code
1             package JIRA::REST::Class::Issue::Changelog::Change;
2 4     4   1827 use parent qw( JIRA::REST::Class::Abstract );
  4         6  
  4         22  
3 4     4   261 use strict;
  4         4  
  4         86  
4 4     4   11 use warnings;
  4         3  
  4         73  
5 4     4   51 use 5.010;
  4         7  
6              
7             our $VERSION = '0.10';
8             our $SOURCE = 'CPAN';
9             ## $SOURCE = 'GitHub'; # COMMENT
10             # the line above will be commented out by Dist::Zilla
11              
12             # ABSTRACT: A helper class for L<JIRA::REST::Class|JIRA::REST::Class> that represents an individual change to a JIRA issue as an object.
13              
14             __PACKAGE__->mk_ro_accessors( qw/ author created / );
15             __PACKAGE__->mk_data_ro_accessors( qw/ id / );
16             __PACKAGE__->mk_contextual_ro_accessors( qw/ items / );
17              
18             sub init {
19 0     0 1   my $self = shift;
20 0           $self->SUPER::init( @_ );
21              
22             # make user object
23 0           $self->populate_scalar_data( 'author', 'user', 'author' );
24              
25             # make date object
26 0           $self->populate_date_data( 'created', 'created' );
27              
28             # make list of changed items
29 0           $self->populate_list_data( 'items', 'changeitem', 'items' );
30              
31 0           return;
32             }
33              
34             1;
35              
36             #pod =accessor B<author>
37             #pod
38             #pod Returns the author of a JIRA issue's change as a
39             #pod L<JIRA::REST::Class::User|JIRA::REST::Class::User> object.
40             #pod
41             #pod =accessor B<created>
42             #pod
43             #pod Returns the creation time of a JIRA issue's change as a L<DateTime|DateTime>
44             #pod object.
45             #pod
46             #pod =accessor B<id>
47             #pod
48             #pod Returns the id of a JIRA issue's change.
49             #pod
50             #pod =accessor B<items>
51             #pod
52             #pod Returns the list of items modified by a JIRA issue's change as a list of
53             #pod L<JIRA::REST::Class::Issue::Changelog::Change::Item|JIRA::REST::Class::Issue::Changelog::Change::Item>
54             #pod objects.
55             #pod
56             #pod =cut
57              
58             __END__
59              
60             =pod
61              
62             =encoding UTF-8
63              
64             =for :stopwords Packy Anderson Alexey Melezhik
65              
66             =head1 NAME
67              
68             JIRA::REST::Class::Issue::Changelog::Change - A helper class for L<JIRA::REST::Class|JIRA::REST::Class> that represents an individual change to a JIRA issue as an object.
69              
70             =head1 VERSION
71              
72             version 0.10
73              
74             =head1 READ-ONLY ACCESSORS
75              
76             =head2 B<author>
77              
78             Returns the author of a JIRA issue's change as a
79             L<JIRA::REST::Class::User|JIRA::REST::Class::User> object.
80              
81             =head2 B<created>
82              
83             Returns the creation time of a JIRA issue's change as a L<DateTime|DateTime>
84             object.
85              
86             =head2 B<id>
87              
88             Returns the id of a JIRA issue's change.
89              
90             =head2 B<items>
91              
92             Returns the list of items modified by a JIRA issue's change as a list of
93             L<JIRA::REST::Class::Issue::Changelog::Change::Item|JIRA::REST::Class::Issue::Changelog::Change::Item>
94             objects.
95              
96             =head1 RELATED CLASSES
97              
98             =over 2
99              
100             =item * L<JIRA::REST::Class|JIRA::REST::Class>
101              
102             =item * L<JIRA::REST::Class::Abstract|JIRA::REST::Class::Abstract>
103              
104             =item * L<JIRA::REST::Class::Issue::Changelog::Change::Item|JIRA::REST::Class::Issue::Changelog::Change::Item>
105              
106             =item * L<JIRA::REST::Class::User|JIRA::REST::Class::User>
107              
108             =back
109              
110             =head1 AUTHOR
111              
112             Packy Anderson <packy@cpan.org>
113              
114             =head1 COPYRIGHT AND LICENSE
115              
116             This software is Copyright (c) 2017 by Packy Anderson.
117              
118             This is free software, licensed under:
119              
120             The Artistic License 2.0 (GPL Compatible)
121              
122             =cut