File Coverage

blib/lib/Data/Sah/Value/js/Math/random.pm
Criterion Covered Total %
statement 8 13 61.5
branch n/a
condition n/a
subroutine 3 5 60.0
pod 0 2 0.0
total 11 20 55.0


line stmt bran cond sub pod time code
1             package Data::Sah::Value::js::Math::random;
2              
3 1     1   403322 use 5.010001;
  1         4  
4 1     1   7 use strict;
  1         2  
  1         32  
5 1     1   10 use warnings;
  1         3  
  1         217  
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 0     0 0   v => 1,
15             summary => 'A random floating number from 0 (inclusive) to 1 (exclusive)',
16             };
17             }
18              
19             sub value {
20 0     0 0   my %args = @_;
21              
22 0           my $res = {};
23              
24 0           $res->{expr_value} = 'Math.random()';
25              
26 0           $res;
27             }
28              
29             1;
30             # ABSTRACT:
31              
32             __END__