RPG::Dice - emulate rolling dice
version 1.201
use RPG::Dice; # Single six sided dice my $d1 = RPG::Dice->new('1d6'); # Two six sided dice my $d2 = RPG::Dice->new('2d6'); # # 1 <= $x <= 6 my $x = $d1->roll();
This is the constructor method for this module. You pass a string constant to the module in the form of XdY where X is the number of dice and Y is the number of sides to the dice.
This performs the actual dice roll
Peter L. Berghold <cpan@berghold.net>
This software is copyright (c) 2013 by Peter L. Berghold.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install RPG::Dice, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RPG::Dice
CPAN shell
perl -MCPAN -e shell install RPG::Dice
For more information on module installation, please visit the detailed CPAN module installation guide.