PP/Debug.pm

filter: Statementstmt 100% 22 / 22 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 96.7% 30 / 31 CC 3 SCAR 6.9
CC
3
Cov
100%
generate_printable_state
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.0
« PP.pm ↑ Summary PP/GF.pm »
1 package Crypt::Rijndael::PP::Debug;
2  
3 19 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 19 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 19 ▶use Exporter 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 19 our @EXPORT_OK = qw( generate_printable_state );
8  
9 19 our $VERSION = '0.3.0'; # VERSION
10 # ABSTRACT: Debugging and Formatting Methods
11  
12 25 ▶sub generate_printable_state {
Subroutine generate_printable_state: called CC=3 SCAR=11.0
Pod undocumented
13 25 my $state = shift;
14  
15 25 my $state_as_string = "";
16  
17 25 ▶ for( my $row_index = 0; $row_index < 4; $row_index++ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($row_index < 4) 100 25 125
18 100 ▶ for( my $column_index = 0; $column_index < 4; $column_index++ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($column_index < 4) 400 100 500
19 400 my $state_byte = unpack("H2", $state->[$row_index][$column_index] );
20 400 $state_as_string .= $state_byte . " ";
21 }
22  
23 100 chop $state_as_string;
24 100 $state_as_string .= "\n";
25 }
26  
27 25 chop $state_as_string;
28  
29 25 return $state_as_string;
30 }
31  
32 19 1;
« PP.pm ↑ Summary PP/GF.pm »