The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

RPG::Dice - emulate rolling dice

VERSION

version 1.201

SYNOPSIS

        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();

METHODS

new

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.

roll

This performs the actual dice roll

AUTHOR

Peter L. Berghold <cpan@berghold.net>

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.