lib/Langertha/Skeid/Protocol/Refusal.pm

filter: Statementstmt 100% 15 / 15 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 82.7% 24 / 29 CC 3 SCAR 7.2
CC
3
Cov
85%
refuse
3.5
BEGIN
1.0
BEGIN
1.0
CRAP 2.1
« lib/Langertha/Skeid/Secret.pm ↑ Summary blib/lib/Langertha/Skeid/CapacityProbe/Custom.pm »
1 package Langertha::Skeid::Protocol::Refusal;
2 116 our $VERSION = '0.004';
3 # ABSTRACT: A translator's deliberate refusal of a request, with a message for the client
4 116 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 116 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 116 ▶use Carp qw( croak );
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8  
9 13 ▶sub refuse {
Subroutine refuse: called CC=3 SCAR=12.5
Pod documented
10 13 my ( $class, $message ) = @_;
11 13 ▶ croak(__PACKAGE__.'->refuse needs a message') unless defined $message && length $message;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $message and length $message 0 13 13
Condition33%1/3
defined $message and length $message
!ll&&!rl&&r
0013
MC/DC0%0/2
defined $message and length $message
defined $message length $message
Truth table33%1/3
A and B
A= defined $messageB= length $message
ABresult
0X0
100
111
12 13 die bless { message => $message }, $class;
13 }
14  
15 13 ▶sub message { $_[0]->{message} }
Subroutine message: called CC=1 SCAR=0.0
Pod documented
16  
17 116 1;
18  
19 __END__
« lib/Langertha/Skeid/Secret.pm ↑ Summary blib/lib/Langertha/Skeid/CapacityProbe/Custom.pm »