Lines 489-499
sub _gen_int {
Link Here
|
489 |
sub _gen_real { |
489 |
sub _gen_real { |
490 |
my ($self, $params) = @_; |
490 |
my ($self, $params) = @_; |
491 |
my $max = 10 ** 38; |
491 |
my $max = 10 ** 38; |
|
|
492 |
my $decimals = 2; |
492 |
if( defined( $params->{info}->{size} ) ) { |
493 |
if( defined( $params->{info}->{size} ) ) { |
493 |
$max = 10 ** ($params->{info}->{size}->[0] - $params->{info}->{size}->[1]); |
494 |
$max = 10 ** ($params->{info}->{size}->[0] - $params->{info}->{size}->[1]); |
|
|
495 |
$decimals = $params->{info}->{size}->[1]; |
494 |
} |
496 |
} |
|
|
497 |
|
495 |
$max = 10 ** 5 if $max > 10 ** 5; |
498 |
$max = 10 ** 5 if $max > 10 ** 5; |
496 |
return sprintf("%.2f", rand($max-0.1)); |
499 |
return sprintf('%.'.$decimals.'f', rand($max-0.1)); |
497 |
} |
500 |
} |
498 |
|
501 |
|
499 |
sub _gen_date { |
502 |
sub _gen_date { |
500 |
- |
|
|