line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package UUID::Generator::PurePerl::RNG::rand; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
546
|
use strict; |
|
4
|
|
|
|
|
3
|
|
|
4
|
|
|
|
|
90
|
|
4
|
4
|
|
|
4
|
|
11
|
use warnings; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
84
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
12
|
use base qw( UUID::Generator::PurePerl::RNG::Bridge ); |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
817
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
0
|
20
|
sub enabled { 1 } |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
4
|
|
|
4
|
0
|
408
|
my $class = shift; |
12
|
4
|
|
|
|
|
4
|
my $seed = shift; |
13
|
4
|
50
|
|
|
|
30
|
$seed = time if ! defined $seed; |
14
|
|
|
|
|
|
|
|
15
|
4
|
|
|
|
|
5
|
my $me = q{}; |
16
|
4
|
|
|
|
|
6
|
my $self = \$me; |
17
|
|
|
|
|
|
|
|
18
|
4
|
|
|
|
|
10
|
srand $seed; |
19
|
|
|
|
|
|
|
|
20
|
4
|
|
|
|
|
15
|
return bless $self, $class; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub rand_32bit { |
24
|
52
|
|
|
52
|
0
|
97
|
my $v1 = int(rand(65536)) % 65536; |
25
|
52
|
|
|
|
|
44
|
my $v2 = int(rand(65536)) % 65536; |
26
|
52
|
|
|
|
|
85
|
return ($v1 << 16) | $v2; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
__END__ |