NAME Net::Shared::Handler
DESCRIPTION
Net::Shared::Handler
is the object with which you will use to interface with Net::Shared::Local
and Net::Shared::Remote
objects. You can think of Net::Shared::Handler
as the class that actually all of the work: storing the data, retrieving the data, and managing the objects. It has 5 methods available for you to use: add, remove, store, retrieve, and destroy_all (see method descriptions below for more info). New accepts 1 argument, and when set to a true value debugging is turned on (only for the Handler object, however). Methods:
add(@list)
-
Adds a list of
Net::Shared::Local
/Net::Shared::Remote
objects so that they can be "managed." Nothing (storing/retrieving/etc) can be done with the objects until they have been added, so don't forget to do it! remove(@list)
-
Remove effectively kills any objects in
@list
and all data in them, as well as remove them from the management scheme. store($object, \$data)
-
Stores the data in
$object
, whether it be aNet::Shared::Local
object orNet::Shared::Remote
object. The data needs to be a reference so that it can be serialized and shipped away. Returns the number of bytes sent. retrieve($object)
-
Grabs the data out of
$object
, and returns the value. Note that it will be the derefferenced value of the data that you stored (in other words, you pass\$data
to store, and retrieve returns$data
). destroy_all()
-
Your standard janitorial method. Call it at the end of every program in which you use Net::Shared, or else you will have legions of zombie process lurking, waiting to eat you and your children...
MORE
See Net::Shared's pod for more info.