| 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
MC/DC0%0/2
ref $this || $this
ref $this
$this
Truth table33%1/3
A || B
A= ref $thisB= $this
| |||||||||||||||||||||
| 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; | |||||||||||||||||||