|new(SIZE)||Just pick a size for the storage area and initialize the object. Remember that any variable or structure you are going to share must be able to fit in the size you specified.|
|set(VAR)||This method will store VAR inside the mmaped area. VAR can be a reference to any structure or a simple scalar.|
|get()||This method will retrieve the stored structure or scalar from the mmaped area and return it.|
|lock(),unlock()||In case you want to explicitly lock or unlock the structure, you can use these methods.|
If the module fails during any of its tasks, it will try to croak.
Dont try to store an undef value.
Dont try to pass more than one argument to set. All other arguments will be ignored. Likewise, if you try to store an array, only the first element will get through. Instead, store a reference to the array and it will go fine.
Also, please make sure that you do not try to store something bigger than the size you have initialized your object with. The module will croak if something like that occurs. If you do not know what is the serialization length of your structure, try to make a guess. The module unfortunately cannot change the size of the mmaped area after object creation.
If what you are trying to do requires something more complicated than that, there are excellent CPAN modules out there which will probably suit your needs. Also, if your program is going to do LOTS of gets and sets in a short time, you may need a smarter locking mechanism. Again, take a look at these other CPAN modules.
You may find these excellent modules useful: <B>IPC::SharedCacheB>, <B>IPC::ShareLiteB>, <B>IPC::ShareableB>
Surely there are quite a few. If you see them, report them to the proper authorities!..
Perhaps IPC::Mmap::Share could conveniently subclass IPC::Mmap instead of being standalone.
IPC::Mmap::Share was written by Athanasios Douitsis <firstname.lastname@example.org>
Copyright (c) 2006. Athanasios Douitsis. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html>
Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 171: You forgot a =back before =head1
|perl v5.20.3||IPC::MMAP::SHARE (3)||2006-07-16|