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 2     2   373413 use 5.010001;
  2         8  
4 2     2   13 use strict;
  2         5  
  2         51  
5 2     2   32 use warnings;
  2         4  
  2         389  
6              
7             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
8             our $DATE = '2024-01-17'; # DATE
9             our $DIST = 'Data-Sah-DefaultValue'; # DIST
10             our $VERSION = '0.005'; # VERSION
11              
12             sub meta {
13             +{
14 1     1 0 5 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         3 my $res = {};
27              
28 1         3 $res->{expr_value} = 'rand()';
29              
30 1         4 $res;
31             }
32              
33             1;
34             # ABSTRACT:
35              
36             __END__