Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Modules: Building blocks for the Daft Adventure

by mbond (Beadle)
on Jun 12, 2001 at 15:51 UTC ( #87778=note: print w/replies, xml ) Need Help??


in reply to Modules: Building blocks for the Daft Adventure

an simple excert from a package that I used in my perl mud.

because this is a learning experience, i'm just giving the skeleton of what i did.:) The ideas will be the same for making dice rolls into a module.

in a file called "comm.pm" which is in the same directory as the main perl script.
package comm; ... sub tell { my($client,$argument) = @_; ... return($output); } #### and it is used in that main program somethign like this: use comm; ... comm::tell($client,$arg);
It actually calls it through a funtion and the above line is completely variable (so that it works from any function call)

Michael Bond

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2022-05-26 02:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (92 votes). Check out past polls.

    Notices?