Clio/Client.pm

filter: Statementstmt 59.2% 16 / 27 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 40.0% 4 / 10 Podpod 100% 5 / 5 totaltotal 56.8% 25 / 44 CC 3 SCAR 10.7
CC
3
Cov
55%
disconnect
6.0
_restore
6.0
write
2.0
CRAP 2.9
« Clio/ProcessInputFilter/LineEnd.pm ↑ Summary Clio/Process.pm »
1  
2 package Clio::Client;
3 4 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 $Clio::Client::AUTHORITY = 'cpan:AJGB';
5 }
6 {
7 4 $Clio::Client::VERSION = '0.02';
8 }
9 # ABSTRACT: Base abstract class for Clio::Client::* implementations
10  
11 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 4 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 4 ▶use Carp qw( croak );
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 4 with 'Clio::Role::HasManager';
16  
17  
18  
19 4 has 'id' => (
20 is => 'ro',
21 required => 1,
22 );
23  
24 4 has '_process' => (
25 is => 'rw',
26 );
27  
28  
29 0 ▶sub handshake {}
Subroutine handshake: not called CC=1 SCAR=0.0
Pod documented
30  
31  
32 0 ▶sub write { croak "Abstract method"; }
Subroutine write: not called CC=1 SCAR=6.9
Pod documented
33  
34  
35 0 ▶sub close { croak "Abstract method"; }
Subroutine close: not called CC=1 SCAR=6.9
Pod documented
36  
37  
38 0 ▶sub attach_to_process {
Subroutine attach_to_process: not called CC=1 SCAR=6.9
Pod documented
39 0 my ($self, $process) = @_;
40  
41 0 $self->_process($process);
42 }
43  
44  
45 0 ▶sub disconnect {
Subroutine disconnect: not called CC=2 SCAR=17.9
Pod documented
46 0 my $self = shift;
47  
48 0 ▶ if ( $self->_process ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->_process) 0 0 0
49 0 $self->_process->remove_client( $self->id );
50 }
51  
52 0 $self->close;
53 }
54  
55  
56 0 ▶sub _restore {
Subroutine _restore: not called CC=2 SCAR=17.9
57 0 my ($self, %args) = @_;
58  
59 0 $self->$_( $args{$_} ) for keys %args;
60  
61 0 return $self;
62 }
63  
64 4 1;
65  
66  
67 __END__
« Clio/ProcessInputFilter/LineEnd.pm ↑ Summary Clio/Process.pm »