Name : perl-Data-Fake
| |
Version : 0.006
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 1.2
| Date : 2024-08-05 20:18:50
|
Group : Unspecified
| Source RPM : perl-Data-Fake-0.006-1.2.src.rpm
|
Size : 0.10 MB
| |
Packager : (none)
| |
Summary : Declaratively generate fake structured data for testing
|
Description :
This module generates randomized, fake structured data using declarative syntax.
\'Data::Fake\' is built on higher-order programming principles. It provides users with \"factory\" functions, which create \"generator\" functions for specific pieces of data.
Wherever randomized, fake data is desired, a generator code reference is used as a placeholder for the desired output. Each time the top-level generator is run, nested generators are recursively run to turn placeholders into the desired randomized data.
For example, the SYNOPSIS declares the desired form of a \"hero\" using the \'fake_hash\' factory function. The input is a hash-reference, with nested generators created as placeholders by the \'fake_name\', \'fake_sentences\', etc. factory functions:
my $hero_generator = fake_hash( { name => fake_name(), battlecry => fake_sentences(1), birthday => fake_past_datetime(\"%Y-%m-%d\"), friends => fake_array( fake_int(2,4), fake_name() ), gender => fake_pick(qw/Male Female Other/), } );
Every time \'$hero_generator\' is run, a new hash is generated based on the template and nested generators.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-D/openSUSE_Tumbleweed/noarch |