Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Re: Dice::di

by chipmunk (Parson)
on Jan 06, 2001 at 02:29 UTC ( [id://50161]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Dice::di
in thread Dice::Die

The point I was making is that, as the module is written, he can't make an object $six_sider and then call $six_sider->roll() as many times as he wants. The value for the roll is set in the new() method, and the module does not provide a method for generating a new roll on an already created object. Each die roll requires creating an entirely new object, calling its get_roll() method to find out what the die roll was, and then discarding the object.

I agree with you that a roll() method, as you described, would be very useful.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://50161]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-25 09:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found