Games::Die::Dice
Games::Die::Dice provides a union of any number of Games::Die objects.
$four_eight_ten = new Games::Die::Dice(4, 8, 10); $pair_of_eights = new Games::Die::Dice('2d8'); $result = $four_eight_ten->roll() + $pair_of_eights->roll();
new()
Creates a new set of Dice. Takes a list containing the number of sides of each die in the set, or a single "Dungeons and Dragons"-style specification such as "2d8" or "6d20". (the d may be upper- or lower-case)
roll()
Rolls each die in the set. In scalar context, returns the sum. In list context, returns the list of values that came up on each die.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install Games::Die, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Games::Die
CPAN shell
perl -MCPAN -e shell install Games::Die
For more information on module installation, please visit the detailed CPAN module installation guide.