blib/lib/JIRA/REST/Class/Issue/Changelog.pm untested

filter: Statementstmt 0.0% 0 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 30 SCAR 6.9
CC
1
Cov
0%
init
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package JIRA::REST::Class::Issue::Changelog;
2 use parent qw( JIRA::REST::Class::Abstract );
3 use strict;
4 use warnings;
5 use 5.010;
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 the changelog of a JIRA issue as an object.
13  
14 __PACKAGE__->mk_contextual_ro_accessors( qw/ changes / );
15  
16 sub init {
17 my $self = shift;
18 $self->SUPER::init( @_ );
19  
20 $self->{data} = $self->issue->get( '?expand=changelog' );
21 my $changes = $self->{changes} = [];
22  
23 foreach my $change ( @{ $self->data->{changelog}->{histories} } ) {
24 push @$changes,
25 $self->issue->make_object( 'change', { data => $change } );
26 }
27  
28 return;
29 }
30  
31 #pod =method B<changes>
32 #pod
33 #pod Returns a list of individual changes, as
34 #pod L<JIRA::REST::Class::Issue::Changelog::Change|JIRA::REST::Class::Issue::Changelog::Change> objects.
35 #pod
36 #pod =cut
37  
38 1;
39  
40 __END__
41  
42 =pod
43  
44 =encoding UTF-8
45  
46 =for :stopwords Packy Anderson Alexey Melezhik
47  
48 =head1 NAME
49  
50 JIRA::REST::Class::Issue::Changelog - A helper class for L<JIRA::REST::Class|JIRA::REST::Class> that represents the changelog of a JIRA issue as an object.
51  
52 =head1 VERSION
53  
54 version 0.10
55  
56 =head1 METHODS
57  
58 =head2 B<changes>
59  
60 Returns a list of individual changes, as
61 L<JIRA::REST::Class::Issue::Changelog::Change|JIRA::REST::Class::Issue::Changelog::Change> objects.
62  
63 =head1 RELATED CLASSES
64  
65 =over 2
66  
67 =item * L<JIRA::REST::Class|JIRA::REST::Class>
68  
69 =item * L<JIRA::REST::Class::Abstract|JIRA::REST::Class::Abstract>
70  
71 =item * L<JIRA::REST::Class::Issue::Changelog::Change|JIRA::REST::Class::Issue::Changelog::Change>
72  
73 =back
74  
75 =head1 AUTHOR
76  
77 Packy Anderson <packy@cpan.org>
78  
79 =head1 COPYRIGHT AND LICENSE
80  
81 This software is Copyright (c) 2017 by Packy Anderson.
82  
83 This is free software, licensed under:
84  
85 The Artistic License 2.0 (GPL Compatible)
86  
87 =cut