Agni - persistent data and objects
This module requires the PApp module to be installed and working. Please read the LICENSE file: this version of Agni is neither GPL nor BSD licensed).
Agni is the God of the Sun and Fire. The rest is obvious...
Most of these functions are low-level stuff. Better look at the methods of the agni root object (本) first, which has most of the functionality packaged in a nicer way.
Returns a object by gid in a specified path.
Tries to return the name of the object, or some other descriptive string, in case the object lacks a name. Does not load the object into memory, but might load other objects in memory.
Same as path_gid2name, but works on an existing object.
Commit (copy) objects from one path to another. If $dst_path is undefined or missing, deletes the instance (making higher-path instances visible again).
$dst_path
Currently, $src_path must be the "topmost" path of one object instance. Object instances that are also visible in parent paths are skipped.
$src_path
It returns a html fragment describing it's operations.
# delete the root object (gid 1) from the staging path Agni::commit_objs [1, $Agni::pathid{"root/staging/"}, undef]; # kind of read-modify-write for an object # 1. get an object into the staging path my $sobj = $obj->to_staging_path; # 2. modify it $sobj->{...} = ...; # 3a. either commit it ("save changes"): Agni::commit_objs [$sobj->{_gid}, $sobj->{_path}, $obj->{_path}]; # 3b. or delete it ("cancel"): Agni::commit_objs [$sobj->{_gid}, $sobj->{_path}, undef];
Execute the given perl block in an agni-environment (i.e. database set up correctly etc.).
Refresh the database connection and the $PApp::NOW timestamp, and also checks for events (e.g. write accesses) done by other agni processes. Usually called within agni_exec after some time has progressed.
agni_exec
Might do other things in the future.
The bin/agni commandline tool, the agni online documentation.
bin/agni
Marc Lehmann <schmorp@schmorp.de> http://home.schmorp.de/
To install PApp, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PApp
CPAN shell
perl -MCPAN -e shell install PApp
For more information on module installation, please visit the detailed CPAN module installation guide.