Lemonldap/NG/Handler/Main/MsgActions.pm

filter: Statementstmt 70.0% 14 / 20 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod 0.0% 0 / 3 totaltotal 62.5% 20 / 32 CC 2 SCAR 4.9
CC
2
Cov
73%
__ANON__
2.0
__ANON__
2.0
addMsgAction
2.0
CRAP 1.6
« Lemonldap/NG/Handler/PSGI.pm ↑ Summary Lemonldap/NG/Handler/PSGI/Router.pm »
1 package Lemonldap::NG::Handler::Main::MsgActions;
2  
3 29 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 29 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 29 our @EXPORT = qw(msgActions addMsgAction delMsgAction);
7  
8 our $msgActions = {
9 15 ▶ newConf => sub {
Subroutine __ANON__: called CC=2 SCAR=6.9
10 15 my ( $class, $msg, $req ) = @_;
11 15 ▶ unless ( $class->checkConf() ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($class->checkConf) 1 14 15
12 1 $class->logger->error("$class: No configuration found");
13 1 $req->data->{noTry} = 1;
14 }
15 },
16 0 ▶ unlog => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
17 0 my ( $class, $msg, $req ) = @_;
18 0 $class->localUnlog( $req, $msg->{id} );
19 },
20 29 };
21  
22 15 ▶sub msgActions { return $msgActions }
Subroutine msgActions: called CC=1 SCAR=0.0
Pod undocumented
23  
24 0 ▶sub addMsgAction {
Subroutine addMsgAction: not called CC=1 SCAR=6.9
Pod undocumented
25 0 my ( $name, $sub ) = @_;
26 0 $msgActions->{$name} = $sub;
27 }
28  
29 0 ▶sub delMsgAction {
Subroutine delMsgAction: not called CC=1 SCAR=6.9
Pod undocumented
30 0 my ($name) = @_;
31 0 delete $msgActions->{$name};
32 }
33  
34 29 1;
« Lemonldap/NG/Handler/PSGI.pm ↑ Summary Lemonldap/NG/Handler/PSGI/Router.pm »