NAME

Tie::Array::Random - Generates random for different fetched indexes

SYNOPSIS

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 }};

DESCRIPTION

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.

STORE

Stores data

FETCH

Fetchs

FETCHSIZE

Fetchs size

AUTHOR

Matias Alejo Garcia <matiu@cpan.org>

UPDATES

The latest version of this module will always be available from from CPAN at http://search.cpan.org/~ematiu.

COPYRIGHT

Copyright (C) 2009, Matias Alejo Garcia

LICENSE

This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

perl(1), perltie(1), Tie::StdHash(1), Tie::Hash::Cannabinol, Data::Random, Tie::Hash::Array