lib/MKDoc/XML/Decode/Numeric.pm

filter: Statementstmt 46.6% 7 / 15 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 0.0% 0 / 1 totaltotal 36.0% 9 / 25 CC 4 SCAR 26.1
CC
4
Cov
33%
process
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 13.7
↑ Summary lib/MKDoc/XML/TreePrinter.pm »
1 package MKDoc::XML::Decode::Numeric;
2 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 sub process
6 0 ▶{
Subroutine process: not called CC=4 SCAR=30.0
Pod undocumented
7 0 ▶ (@_ == 2) or warn "MKDoc::XML::Encode::process() should be called with two arguments";
Branch: 1 branch
BranchTrueFalseTotal
@_ == 2 or warn "MKDoc::XML::Encode::process() should be called with two arguments" 0 0 0
8
9 0 my $class = shift;
10
11 0 my $stuff = shift;
12 0 ▶ $stuff =~ s/^#// or return;
Branch: 1 branch
BranchTrueFalseTotal
$stuff =~ s/^#// or return 0 0 0
13
14 # if hex, convert to hex
15 0 $stuff =~ s/^\[xX]([0-9a-fA-F])+$/hex($1)/e;
16
17 0 ▶ return unless ($stuff =~ /^\d+$/);
Branch: 1 branch
BranchTrueFalseTotal
unless $stuff =~ /^\d+$/ 0 0 0
18 0 return chr ($stuff);
19 }
20  
21 7 1;
22  
23 __END__
↑ Summary lib/MKDoc/XML/TreePrinter.pm »