lib/JIRA/REST/Class/Issue/Worklog.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/Changelog.pm ↑ Summary blib/lib/JIRA/REST/Class/FactoryTypes.pm »
1 package JIRA::REST::Class::Issue::Worklog;
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 worklog of a JIRA issue as an object.
13  
14 4 __PACKAGE__->mk_contextual_ro_accessors( qw/ items / );
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( '/worklog' );
21 0 my $items = $self->{items} = [];
22  
23 0 foreach my $item ( @{ $self->data->{worklogs} } ) {
24 0 push @$items,
25 $self->issue->make_object( 'workitem', { data => $item } );
26 }
27  
28 0 return;
29 }
30  
31 #pod =method B<items>
32 #pod
33 #pod Returns a list of individual work items, as
34 #pod L<JIRA::REST::Class::Issue::Worklog::Item|JIRA::REST::Class::Issue::Worklog::Item>
35 #pod objects.
36 #pod
37 #pod =for stopwords worklog
38 #pod
39 #pod =cut
40  
41 4 1;
42  
43 __END__
44  
45 =pod
46  
47 =encoding UTF-8
48  
49 =for :stopwords Packy Anderson Alexey Melezhik worklog
50  
51 =head1 NAME
52  
53 JIRA::REST::Class::Issue::Worklog - A helper class for L<JIRA::REST::Class|JIRA::REST::Class> that represents the worklog of a JIRA issue as an object.
54  
55 =head1 VERSION
56  
57 version 0.10
58  
59 =head1 METHODS
60  
61 =head2 B<items>
62  
63 Returns a list of individual work items, as
64 L<JIRA::REST::Class::Issue::Worklog::Item|JIRA::REST::Class::Issue::Worklog::Item>
65 objects.
66  
67 =head1 RELATED CLASSES
68  
69 =over 2
70  
71 =item * L<JIRA::REST::Class|JIRA::REST::Class>
72  
73 =item * L<JIRA::REST::Class::Abstract|JIRA::REST::Class::Abstract>
74  
75 =item * L<JIRA::REST::Class::Issue::Worklog::Item|JIRA::REST::Class::Issue::Worklog::Item>
76  
77 =back
78  
79 =head1 AUTHOR
80  
81 Packy Anderson <packy@cpan.org>
82  
83 =head1 COPYRIGHT AND LICENSE
84  
85 This software is Copyright (c) 2017 by Packy Anderson.
86  
87 This is free software, licensed under:
88  
89 The Artistic License 2.0 (GPL Compatible)
90  
91 =cut
« lib/JIRA/REST/Class/Issue/Changelog.pm ↑ Summary blib/lib/JIRA/REST/Class/FactoryTypes.pm »