blib/lib/JIRA/REST/Class/Query.pm untested

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