Reply/Plugin/Autocomplete/Commands.pm

filter: Statementstmt 60.0% 12 / 20 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 59.2% 16 / 27 CC 2 SCAR 11.0
CC
2
Cov
55%
tab_handler
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« Reply/Plugin/AutoRefresh.pm ↑ Summary Reply/Plugin/CollapseStack.pm »
1 package Reply::Plugin::Autocomplete::Commands;
2 1 our $AUTHORITY = 'cpan:DOY';
3 1 $Reply::Plugin::Autocomplete::Commands::VERSION = '0.42';
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 # ABSTRACT: tab completion for reply commands
7  
8 1 ▶use base 'Reply::Plugin';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10  
11 0 ▶sub tab_handler {
Subroutine tab_handler: not called CC=2 SCAR=17.9
Pod documented
12 0 my $self = shift;
13 0 my ($line) = @_;
14  
15 0 my ($prefix) = $line =~ /^#(.*)/;
16 0 ▶ return unless defined $prefix;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $prefix 0 0 0
17  
18 0 my @commands = $self->publish('commands');
19  
20 0 return map { "#$_" } sort grep { index($_, $prefix) == 0 } @commands;
21 }
22  
23 1 1;
24  
25 __END__
« Reply/Plugin/AutoRefresh.pm ↑ Summary Reply/Plugin/CollapseStack.pm »