| 1 | package Interchange::Search::Solr::Response; | ||||||||||
| 2 | |||||||||||
| 3 | 14 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 14 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 14 | ▶ | use Moo; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 14 | extends 'WebService::Solr::Response'; | |||||||||
| 7 | |||||||||||
| 8 | =head1 NAME | ||||||||||
| 9 | |||||||||||
| 10 | Interchange::Search::Solr::Response | ||||||||||
| 11 | |||||||||||
| 12 | =head2 DESCRIPTION | ||||||||||
| 13 | |||||||||||
| 14 | L<WebService::Solr::Response> subclass for error handling. | ||||||||||
| 15 | |||||||||||
| 16 | =head2 METHODS/ACCESSORS | ||||||||||
| 17 | |||||||||||
| 18 | In addition to all the L<WebService::Solr::Response> methods this | ||||||||||
| 19 | class have the following methods: | ||||||||||
| 20 | |||||||||||
| 21 | =head3 error | ||||||||||
| 22 | |||||||||||
| 23 | An error string. | ||||||||||
| 24 | |||||||||||
| 25 | =head3 is_empty_search | ||||||||||
| 26 | |||||||||||
| 27 | Error code is C<empty_search>. | ||||||||||
| 28 | |||||||||||
| 29 | =cut | ||||||||||
| 30 | |||||||||||
| 31 | 14 | has error => (is => 'rw'); | |||||||||
| 32 | |||||||||||
| 33 | sub is_empty_search { | ||||||||||
| 34 | 0 | ▶ | my $self = shift; | ||||||||
|
Subroutine
is_empty_search: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 35 | 0 | ▶ | if (my $error = $self->error) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | 0 | return $error eq 'empty_search'; | |||||||||
| 37 | } | ||||||||||
| 38 | 0 | return 0; | |||||||||
| 39 | } | ||||||||||
| 40 | |||||||||||
| 41 | |||||||||||
| 42 | 14 | 1; | |||||||||
| 43 | |||||||||||