Reply/Plugin.pm

filter: Statementstmt 52.1% 12 / 23 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 66.6% 2 / 3 totaltotal 50.0% 17 / 34 CC 2 SCAR 10.0
CC
2
Cov
48%
new
6.0
publish
2.0
commands
2.0
CRAP 2.7
« Reply/Plugin/FancyPrompt.pm ↑ Summary Reply/Plugin/Packages.pm »
1 package Reply::Plugin;
2 19 our $AUTHORITY = 'cpan:DOY';
3 19 $Reply::Plugin::VERSION = '0.42';
4 19 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 19 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 # ABSTRACT: base class for Reply plugins
7  
8 19 ▶use Reply::Util 'methods';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10  
11 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
12 0 my $class = shift;
13 0 my (%opts) = @_;
14  
15 0 ▶ die "publisher is required" unless $opts{publisher};
Branch: 1 branch
BranchTrueFalseTotal
unless $opts{"publisher"} 0 0 0
16  
17 return bless {
18 publisher => $opts{publisher},
19 0 }, $class;
20 }
21  
22  
23 0 ▶sub publish {
Subroutine publish: not called CC=1 SCAR=6.9
Pod documented
24 0 my $self = shift;
25  
26 0 $self->{publisher}->(@_);
27 }
28  
29  
30 0 ▶sub commands {
Subroutine commands: not called CC=1 SCAR=6.9
Pod documented
31 0 my $self = shift;
32  
33 0 return map { s/^command_//; $_ } grep { /^command_/ } methods($self);
34 }
35  
36  
37 19 1;
38  
39 __END__
« Reply/Plugin/FancyPrompt.pm ↑ Summary Reply/Plugin/Packages.pm »