RPC/Plugin/LoadPlugin.pm

filter: Statementstmt 80.7% 21 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 6 / 10 Podpod 0.0% 0 / 1 totaltotal 72.9% 27 / 37 CC 1 SCAR 3.4
CC
1
Cov
81%
BUILD
2.0
__ANON__
2.0
__ANON__
2.0
CRAP 1.4
« RPC/Plugin/FileToPackageName.pm ↑ Summary RPC/Plugin.pm »
1 package Neovim::RPC::Plugin::LoadPlugin;
2 1 our $AUTHORITY = 'cpan:YANICK';
3 1 $Neovim::RPC::Plugin::LoadPlugin::VERSION = '0.2.0';
4 1 ▶use 5.20.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 with 'Neovim::RPC::Plugin';
11  
12 1 ▶use Try::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 1 ▶use experimental 'signatures';
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 ▶sub BUILD($self,@) {
Subroutine BUILD: not called CC=1 SCAR=6.9
Pod undocumented
17  
18 ▶ $self->subscribe('load_plugin',sub ($msg) {
Subroutine __ANON__: not called CC=1 SCAR=6.9
19 # TODO also deal with it as a request?
20 0 my $plugin = $msg->args->[0];
21 try {
22 0 ▶ $self->rpc->load_plugin( $plugin );
Subroutine __ANON__: not called CC=1 SCAR=6.9
23 }
24 catch {
25 0 ▶ $self->api->vim_report_error( str => "failed to load $plugin" );
Subroutine __ANON__: not called CC=1 SCAR=6.9
26 }
27 0 });
28 }
29  
30  
31 1 1;
32  
33 __END__
34  
35 =pod
36  
37 =encoding UTF-8
38  
39 =head1 NAME
40  
41 Neovim::RPC::Plugin::LoadPlugin
42  
43 =head1 VERSION
44  
45 version 0.2.0
46  
47 =head1 AUTHOR
48  
49 Yanick Champoux <yanick@cpan.org>
50  
51 =head1 COPYRIGHT AND LICENSE
52  
53 This software is copyright (c) 2015 by Yanick Champoux.
54  
55 This is free software; you can redistribute it and/or modify it under
56 the same terms as the Perl 5 programming language system itself.
57  
58 =cut
« RPC/Plugin/FileToPackageName.pm ↑ Summary RPC/Plugin.pm »