blib/lib/Digest/JH.pm

filter: Statementstmt 91.3% 21 / 23 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 87.5% 28 / 32 CC 2 SCAR 3.4
CC
2
Cov
89%
add_bits
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
↑ Summary JH.xs »
1 package Digest::JH;
2  
3 7 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 7 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 7 ▶use parent qw(Exporter Digest::base);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 7 our $VERSION = '0.05';
8 7 $VERSION = eval $VERSION;
9  
10 eval {
11 7 require XSLoader;
12 7 XSLoader::load(__PACKAGE__, $VERSION);
13 7 1;
14 7 ▶} or do {
Branch: 1 branch
BranchTrueFalseTotal
eval { do { require XSLoader; XSLoader::load(__PACKAGE__, $Digest::JH::VERSION); 1 } } or do { require DynaLoader; DynaLoader::bootstrap(__PACKAGE__, $Digest::JH::VERSION) } 7 0 7
15 0 require DynaLoader;
16 0 DynaLoader::bootstrap(__PACKAGE__, $VERSION);
17 };
18  
19 7 our @EXPORT_OK = qw(
20 jh_224 jh_224_hex jh_224_base64
21 jh_256 jh_256_hex jh_256_base64
22 jh_384 jh_384_hex jh_384_base64
23 jh_512 jh_512_hex jh_512_base64
24 );
25  
26 204 ▶sub add_bits {
Subroutine add_bits: called CC=2 SCAR=6.9
Pod undocumented
27 204 my ($self, $data, $bits) = @_;
28 204 ▶ if (2 == @_) {
Branch: 1 branch
BranchTrueFalseTotal
if (2 == @_) 4 200 204
29 4 return $self->_add_bits(pack('B*', $data), length $data);
30 }
31 200 return $self->_add_bits($data, $bits);
32 }
33  
34  
35 7 1;
36  
37 __END__
↑ Summary JH.xs »