blib/lib/Cikl/Client.pm untested

filter: Statementstmt 0.0% 0 / 33 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 10 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 48 CC 2 SCAR 10.0
CC
2
Cov
0%
shutdown
6.0
DEMOLISH
2.0
submit
2.0
CRAP 2.7
1 package Cikl::Client;
2  
3 use strict;
4 use warnings;
5 use Mouse;
6 use namespace::autoclean;
7 use Try::Tiny;
8 use Config::Simple;
9 use Cikl::Client::Transport;
10  
11 has 'transport' => (
12 is => 'ro',
13 isa => 'Cikl::Client::Transport',
14 required => 1,
15 predicate => 'has_transport',
16 clearer => 'clear_transport'
17 );
18  
19 sub DEMOLISH {
20 my $self = shift;
21 $self->shutdown();
22 }
23  
24 sub shutdown {
25 my $self = shift;
26 if ($self->has_transport()) {
27 $self->transport()->shutdown();
28 $self->clear_transport();
29 }
30 return 1;
31 }
32  
33 sub submit {
34 my $self = shift;
35 my $event = shift;
36  
37 return $self->transport()->_submit($event);
38 }
39  
40 __PACKAGE__->meta->make_immutable();
41 1;