File Coverage

blib/lib/Plack/App/ServiceStatus/Redis.pm
Criterion Covered Total %
statement 8 12 66.6
branch 0 2 0.0
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 11 19 57.8


line stmt bran cond sub pod time code
1             package Plack::App::ServiceStatus::Redis;
2              
3             # ABSTRACT: Check Redis connection
4              
5             our $VERSION = '0.913'; # VERSION
6              
7 1     1   253194 use 5.018;
  1         5  
8 1     1   7 use strict;
  1         2  
  1         38  
9 1     1   16 use warnings;
  1         3  
  1         240  
10              
11             sub check {
12 0     0 0   my ( $class, $redis ) = @_;
13              
14 0           my $rv = $redis->ping;
15 0 0         return 'ok' if $rv eq 'PONG';
16 0           return 'nok', "got: $rv";
17             }
18              
19             1;
20              
21             __END__