NAME
IPC::Shm - Easily Store Variables in SysV Shared Memory
SYNOPSIS
use IPC::Shm;
our %variable : shm;
Then, just use it like any other variable.
EXPLANATION
The "shm" variable attribute confers two properties:
- 1. The variable will persist beyond the program's end.
- 2. All simultaneous processes will see the same value.
Scalars, hashes, and arrays are supported.
Storing references is legal; however, the target of the reference will itself be moved into its own shared memory segment with contents preserved.
Blessed references might work but are untested.
LEXICALS
Lexical variables are treated as anonymous, and are supported. They will only outlive the process if another shared variable contains a reference to it.
CURRENT STATUS
This is alpha code. There are no doubt many bugs.
In particular, the multiple simultaneous process use case has not been tested.