Ext/RemoteSequence.pm

filter: Statementstmt 76.6% 23 / 30 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 66.6% 6 / 9 Podpod 100% 1 / 1 totaltotal 68.8% 31 / 45 CC 2 SCAR 4.2
CC
2
Cov
73%
TIEARRAY
2.1
_fetch
2.0
FETCH
2.0
CRAP 1.5
« Ext/MsgPack/RPC/AsyncSession.pm ↑ Summary Ext/MsgPack/RPC/Stream.pm »
1 package Neovim::Ext::RemoteSequence;
2 56 $Neovim::Ext::RemoteSequence::VERSION = '0.01';
3 56 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 56 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 56 ▶use Class::Accessor;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 56 ▶use Tie::Array;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 56 our @ISA = (qw/Class::Accessor Tie::Array/);
9  
10 56 __PACKAGE__->mk_accessors (qw/nvim method/);
11  
12  
13 sub TIEARRAY
14 {
15 22 ▶ my ($this, $nvim, $method) = @_;
Subroutine TIEARRAY: called CC=2 SCAR=7.4
16  
17 22 ▶ my $class = ref ($this) || $this;
Condition33%1/3
ref $this || $this
l!l&&r!l&&!r
0220
MC/DC0%0/2
ref $this || $this
ref $this $this
Truth table33%1/3
A || B
A= ref $thisB= $this
ABresult
1X1
011
000
18 22 my $self =
19 {
20 nvim => $nvim,
21 method => $method,
22 };
23  
24 22 return bless $self, $class;
25 }
26  
27  
28  
29 sub _fetch
30 {
31 0 ▶ my $this = shift;
Subroutine _fetch: not called CC=1 SCAR=6.9
32 0 $this->nvim->request ($this->method, @_);
33 }
34  
35  
36  
37 sub FETCH
38 {
39 0 ▶ my ($this, $index) = @_;
Subroutine FETCH: not called CC=1 SCAR=6.9
40 0 return $this->_fetch->[$index];
41 }
42  
43  
44  
45 sub FETCHSIZE
46 {
47 0 ▶ my ($this) = @_;
Subroutine FETCHSIZE: not called CC=1 SCAR=6.9
48 0 return scalar (@{$this->_fetch});
49 }
50  
51  
52  
53 sub new
54 {
55 22 ▶ my $this = shift;
Subroutine new: called CC=1 SCAR=0.0
Pod documented
56  
57 22 tie my @array, 'Neovim::Ext::RemoteSequence', @_;
58  
59 22 return \@array;
60 }
61  
62  
63 =head1 NAME
64  
65 Neovim::Ext::RemoteSequence - Neovim RemoteSequence class
66  
67 =head1 VERSION
68  
69 version 0.01
70  
71 =head1 SYNOPSIS
72  
73 use Neovim::Ext;
74  
75 =cut
76  
77 56 1;
« Ext/MsgPack/RPC/AsyncSession.pm ↑ Summary Ext/MsgPack/RPC/Stream.pm »