line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Sah::Value::perl::Math::random; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
26
|
use 5.010001; |
|
1
|
|
|
|
|
4
|
|
4
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
229
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
8
|
|
|
|
|
|
|
our $DATE = '2023-03-30'; # DATE |
9
|
|
|
|
|
|
|
our $DIST = 'Data-Sah-DefaultValue'; # DIST |
10
|
|
|
|
|
|
|
our $VERSION = '0.003'; # VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub meta { |
13
|
|
|
|
|
|
|
+{ |
14
|
1
|
|
|
1
|
0
|
15
|
v => 1, |
15
|
|
|
|
|
|
|
summary => 'A random value from 0 (inclusive) to 1 (exclusive)', |
16
|
|
|
|
|
|
|
prio => 50, |
17
|
|
|
|
|
|
|
args => { |
18
|
|
|
|
|
|
|
}, |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub value { |
23
|
1
|
|
|
1
|
0
|
3
|
my %cargs = @_; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
#my $gen_args = $cargs{args} // {}; |
26
|
1
|
|
|
|
|
2
|
my $res = {}; |
27
|
|
|
|
|
|
|
|
28
|
1
|
|
|
|
|
2
|
$res->{expr_value} = 'rand()'; |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
4
|
$res; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
# ABSTRACT: |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |