RPG::Dice - emulate rolling dice
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 <email@example.com>
COPYRIGHT AND LICENSE
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.