File Coverage

blib/lib/Groonga/Commands/Status.pm
Criterion Covered Total %
statement 9 16 56.2
branch 0 2 0.0
condition n/a
subroutine 3 5 60.0
pod 0 2 0.0
total 12 25 48.0


line stmt bran cond sub pod time code
1             # Copyright (C) 2021-2022 Horimoto Yasuhiro
2             #
3             # This program is free software: you can redistribute it and/or modify
4             # it under the terms of the GNU General Public License as published by
5             # the Free Software Foundation, either version 3 of the License, or
6             # (at your option) any later version.
7             #
8             # This program is distributed in the hope that it will be useful,
9             # but WITHOUT ANY WARRANTY; without even the implied warranty of
10             # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11             # GNU General Public License for more details.
12             #
13             # You should have received a copy of the GNU General Public License
14             # along with this program. If not, see .
15              
16             package Groonga::Commands::Status;
17              
18 1     1   6 use Groonga::HTTP::Client;
  1         1  
  1         23  
19              
20 1     1   4 use strict;
  1         2  
  1         15  
21 1     1   3 use warnings;
  1         2  
  1         89  
22              
23             my $groonga_http_client = undef;
24              
25             sub new {
26 0     0 0   my ($class, %arg) = @_;
27 0           my $self = {%arg};
28              
29 0           $groonga_http_client = $self->{client};
30              
31 0           return bless $self, $class;
32             }
33              
34             sub execute {
35 0 0   0 0   if (defined $groonga_http_client) {
36 0           return $groonga_http_client->send('status');
37             }
38 0           return;
39             }
40              
41             1;