Tie::Array::Random - Generates random for different fetched indexes
use Tie::Array::Random; my @array; tie @array, 'Tie::Array::Random'; my $a_random_number = $array[1]; my $an_other_random_number = $array[200]; $a_random_number == $array[1]; ## True ## Set random type tie %hash, 'Tie::Array::Random', { set=> 'alpha', min=>5, max=>5 }};
Tie::Array::Random generates a random number each time a different index is fetched.
The actual random data is generated using Data::Random rand_chars function. The default arguments are ( set => 'all', min => 5, max => 8 ) which can be modifed using tie parameters as shown in the SYNOPSIS.
Stores data
Fetchs
Fetchs size
Matias Alejo Garcia <matiu@cpan.org>
The latest version of this module will always be available from from CPAN at http://search.cpan.org/~ematiu.
Copyright (C) 2009, Matias Alejo Garcia
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl(1), perltie(1), Tie::StdHash(1), Tie::Hash::Cannabinol, Data::Random, Tie::Hash::Array
To install Tie::Array::Random, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tie::Array::Random
CPAN shell
perl -MCPAN -e shell install Tie::Array::Random
For more information on module installation, please visit the detailed CPAN module installation guide.