Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Modules: Building blocks for the Daft Adventure

by mbond (Beadle)
on Jun 12, 2001 at 15:51 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-25 06:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found