Cac::Global - High-performance access to Cache global variables
use Cac::Global
Sets a global in the most efficient way.
Example:
Gset "xx", 1, "foo", 2; # s ^xx(1,"foo")=2
Increments a global in the most efficient way.
Ginc "xx", 1, "foo", 2; # s ^xx(1,"foo")=^xx(1,"foo")+2
Note: This function does not return anything. Use Gseq for an atomic increment by one and a result.
Sets globals out of an array. If an array value is undef it is skipped.
GsetA "xx", 1, "foo", [ 0, "seppl", undef, "x" ]
does the following:
s ^xx(1,"foo",0)=0 s ^xx(1,"foo",1)="seppl" s ^xx(1,"foo",3)="x"
increments globals
Sets globals out of an hash. If a hash value is undef it is skipped.
GsetH "xx", 1, 2, "foo", { 1 => 'one', two => 2 } is the same as: s ^xx(1,2,"foo",1)="one" s ^xx(1,2,"foo","two")=2
Increments globals out of an hash. If a hash value is undef it is skipped.
Increments global by one and returns the value it has after incrementing. This is an atomic function.
Fetches a global. If the node is undefined undef is returned. Use GgetRaise if you want an exception when accessing an undefined node.
Note: Intersystems refuses to give the author of this module enough informations to make this function as fast as possible.
Fetches a global. If the node is undefined an exception is raised. Use Gget if you want undef instead of an exception.
Cac, Cac::ObjectScript, Cac::Routine, Cac::Util, Cac::Bind.
Stefan Traby <stefan@hello-penguin.com> http://hello-penguin.com
To install Cac, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Cac
CPAN shell
perl -MCPAN -e shell install Cac
For more information on module installation, please visit the detailed CPAN module installation guide.