PurePerl/RNG/Bridge.pm

filter: Statementstmt 58.8% 10 / 17 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 54.1% 13 / 24 SCAR 8.9
CC
2
Cov
53%
gen_seed_32bit
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.4
« PurePerl/RNG.pm ↑ Summary PurePerl/RNG/rand.pm »
1 package UUID::Generator::PurePerl::RNG::Bridge;
2  
3 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 6 ▶use Digest;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 sub gen_seed_32bit {
9 0 ▶ my $d = Digest->new('MD5');
Subroutine gen_seed_32bit: not called CC=2 SCAR=17.9
Pod undocumented
10 0 $d->add(pack('I', time));
11 0 my $r = $d->digest;
12 0 my $x = 0;
13 0 ▶ while (length $r > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $r > 0) 0 0 0
14 0 $x ^= unpack 'I', substr($r, 0, 4, q{});
15 }
16 0 return $x;
17 }
18  
19 sub rand_32bit;
20  
21 6 1;
22 __END__
« PurePerl/RNG.pm ↑ Summary PurePerl/RNG/rand.pm »