File Coverage

blib/lib/Data/Sah/Value/perl/Math/random.pm
Criterion Covered Total %
statement 13 13 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 18 20 90.0


line stmt bran cond sub pod time code
1             package Data::Sah::Value::perl::Math::random;
2              
3 1     1   30 use 5.010001;
  1         5  
4 1     1   7 use strict;
  1         3  
  1         28  
5 1     1   5 use warnings;
  1         2  
  1         309  
6              
7             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
8             our $DATE = '2021-11-28'; # DATE
9             our $DIST = 'Data-Sah-DefaultValue'; # DIST
10             our $VERSION = '0.001'; # VERSION
11              
12             sub meta {
13             +{
14 1     1 0 16 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 4 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__