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

filter: Statementstmt 65.2% 15 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 68.9% 20 / 29 SCAR 7.7
CC
2
Cov
65%
init
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
« lib/JIRA/REST/Class/Issue/Worklog/Item.pm ↑ Summary lib/JIRA/REST/Class/Issue/Worklog.pm »
1 package JIRA::REST::Class::Issue::Changelog;
2 4 ▶use parent qw( JIRA::REST::Class::Abstract );
Subroutine BEGIN: called CC=1 SCAR=0.0
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 4 our $VERSION = '0.10';
8 4 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 4 __PACKAGE__->mk_contextual_ro_accessors( qw/ changes / );
15  
16 sub init {
17 0 ▶ my $self = shift;
Subroutine init: not called CC=2 SCAR=17.9
Pod documented
18 0 $self->SUPER::init( @_ );
19  
20 0 $self->{data} = $self->issue->get( '?expand=changelog' );
21 0 my $changes = $self->{changes} = [];
22  
23 0 foreach my $change ( @{ $self->data->{changelog}->{histories} } ) {
24 0 push @$changes,
25 $self->issue->make_object( 'change', { data => $change } );
26 }
27  
28 0 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 4 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
« lib/JIRA/REST/Class/Issue/Worklog/Item.pm ↑ Summary lib/JIRA/REST/Class/Issue/Worklog.pm »