Data::Lotter - Data lottery module by its own weight
use Data::Lotter; # prepare a HASH data my %candidates = ( red => 10, green => 10, blue => 10, yellow => 10, white => 10, ); my $lotter = Data::Lotter->new(%candidates); # normal pickup my $ret = $lotter->pickup(3); # ex. ( red, green, yellow ) = @ret # removal pickup ( => %candidates will be left 4 items ) my @ret = $lotter->pickup(1, "REMOVE");
Data::Lotter is data lottery module. It provides both pattern such as the lottery and the election.
Takeshi Miki <miki@cpan.org>
Original idea was spawned by KANEGON
Special thanks to Daisuke Maki
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Data::Lotter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Lotter
CPAN shell
perl -MCPAN -e shell install Data::Lotter
For more information on module installation, please visit the detailed CPAN module installation guide.