File Coverage

blib/lib/WWW/NOS/Open/Result.pm
Criterion Covered Total %
statement 20 20 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod n/a
total 27 27 100.0


line stmt bran cond sub pod time code
1             # -*- cperl; cperl-indent-level: 4 -*-
2             # Copyright (C) 2011-2021, Roland van Ipenburg
3             package WWW::NOS::Open::Result v1.0.5;
4 4     4   25 use strict;
  4         9  
  4         106  
5 4     4   22 use warnings;
  4         9  
  4         84  
6              
7 4     4   18 use utf8;
  4         7  
  4         19  
8 4     4   103 use 5.014000;
  4         12  
9              
10 4     4   22 use Moose qw/has/;
  4         7  
  4         30  
11 4     4   18988 use namespace::autoclean '-also' => qr/^__/sxm;
  4         9  
  4         47  
12              
13             has '_documents' => (
14             'is' => 'ro',
15             'isa' => 'ArrayRef[WWW::NOS::Open::Document]',
16             'reader' => 'get_documents',
17             'init_arg' => 'documents',
18             );
19              
20             has '_related' => (
21             'is' => 'ro',
22             'isa' => 'ArrayRef[Str]',
23             'reader' => 'get_related',
24             'init_arg' => 'related',
25             );
26              
27 4     4   444 no Moose;
  4         7  
  4         15  
28              
29             __PACKAGE__->meta->make_immutable;
30              
31             1;
32              
33             __END__
34              
35             =encoding utf8
36              
37             =for stopwords Bitbucket Ipenburg MERCHANTABILITY
38              
39             =head1 NAME
40              
41             WWW::NOS::Open::Result - client side search result in the Open NOS REST API.
42              
43             =head1 VERSION
44              
45             This document describes WWW::NOS::Open::Result version C<v1.0.5>.
46              
47             =head1 SYNOPSIS
48              
49             use WWW::NOS::Open::Result;
50              
51             =head1 DESCRIPTION
52              
53             =head1 SUBROUTINES/METHODS
54              
55             =head2 C<new>
56              
57             Create a new result object.
58              
59             =head2 C<get_documents>
60              
61             Returns the documents found as a reference to an array of
62             L<WWW::NOS::Open::Document|WWW::NOS::Open::Document> object.
63              
64             =head2 C<get_related>
65              
66             Returns the keywords related to the performed search as a reference to an
67             array of strings.
68              
69             =head1 CONFIGURATION AND ENVIRONMENT
70              
71             =head1 DEPENDENCIES
72              
73             =over 4
74              
75             =item * L<Moose|Moose>
76              
77             =item * L<WWW::NOS::Open::Document|WWW::NOS::Open::Document>
78              
79             =item * L<namespace::autoclean|namespace::autoclean>
80              
81             =back
82              
83             =head1 INCOMPATIBILITIES
84              
85             =head1 DIAGNOSTICS
86              
87             =head1 BUGS AND LIMITATIONS
88              
89             Please report any bugs or feature requests at
90             L<Bitbucket|https://bitbucket.org/rolandvanipenburg/www-nos-open/issues>.
91              
92             =head1 AUTHOR
93              
94             Roland van Ipenburg, E<lt>roland@rolandvanipenburg.comE<gt>
95              
96             =head1 LICENSE AND COPYRIGHT
97              
98             Copyright 2011-2021 by Roland van Ipenburg
99              
100             This library is free software; you can redistribute it and/or modify
101             it under the same terms as Perl itself, either Perl version 5.14.0 or,
102             at your option, any later version of Perl 5 you may have available.
103              
104             =head1 DISCLAIMER OF WARRANTY
105              
106             BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
107             FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
108             OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
109             PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
110             EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
111             WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
112             ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
113             YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
114             NECESSARY SERVICING, REPAIR, OR CORRECTION.
115              
116             IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
117             WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
118             REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE
119             LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
120             OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
121             THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
122             RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
123             FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
124             SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
125             SUCH DAMAGES.
126              
127             =cut