NAME
Data::Lotter - Data lottery module by its own weight
SYNOPSIS
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");
DESCRIPTION
Data::Lotter is data lottery module. It provides both pattern such as the lottery and the election.
METHODS
new()
pickup()
left_items()
left_item_waits()
debug()
AUTHOR
Takeshi Miki <miki@cpan.org>
Original idea was spawned by KANEGON
Special thanks to Daisuke Maki
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.