| 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.12'; | |
| 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 | 0 | ▶ | sub init { |
|
Subroutine
init: not called CC=2 SCAR=17.9
Pod
documented
| |||
| 17 | 0 | my $self = shift; | |
| 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__ | ||