File Coverage

lib/DR/Tnt/LowLevel.pm
Criterion Covered Total %
statement 12 12 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 16 16 100.0


line stmt bran cond sub pod time code
1 19     19   427987 use utf8;
  19         80  
  19         103  
2 19     19   470 use strict;
  19         25  
  19         331  
3 19     19   68 use warnings;
  19         24  
  19         517  
4              
5             package DR::Tnt::LowLevel;
6 19     19   2383 use Mouse;
  19         141171  
  19         82  
7              
8              
9             has connector_class =>
10             is => 'ro',
11             isa => 'Str',
12             default => 'DR::Tnt::LowLevel::Connector::Sync';
13              
14             has connector =>
15             is => 'ro',
16             isa => 'DR::Tnt::LowLevel::Connector',
17             lazy => 1,
18             builder => sub {
19             my ($self) = @_;
20             $self->connector_class->new(
21             host => $self->host,
22             port => $self->port,
23             user => $self->user,
24             password => $self->password,
25             utf8 => $self->utf8,
26             );
27             },
28             handles => [
29             'connect',
30             'handshake',
31             'send_request',
32             'wait_response',
33             ]
34             ;
35              
36             has host => is => 'ro', isa => 'Str', required => 1;
37             has port => is => 'ro', isa => 'Str', required => 1;
38             has user => is => 'ro', isa => 'Maybe[Str]';
39             has password => is => 'ro', isa => 'Maybe[Str]';
40             has utf8 => is => 'ro', isa => 'Bool', default => 1;
41              
42             __PACKAGE__->meta->make_immutable;