Yote::ObjProvider - Serves Yote objects. Configured to a persistance engine.
This module is the front end for assigning IDs to objects, fetching objects, keeping track of objects that need saving (are dirty) and saving all dirty objects.
The public methods of interest are
Returns an object given an id.
my $object = Yote::ObjProvider::fetch( $object_id );
Given a path designator, returns the object at the end of it, starting in the root. The notation is /foo/bar/baz where foo, bar and baz are field names. This works only for fields of Yote objects.
my $object = Yote::ObjProvider::xpath( "/foo/bar/baz" );
Given a path designator, returns the number of fields of the object at the end of it, starting in the root. The notation is /foo/bar/baz where foo, bar and baz are field names. This is useful for counting how many things are in a list.
my $count = Yote::ObjProvider::xpath_count( "/foo/bar/baz/myarray" );
Takes two objects as arguments. Returns true if object a is branched off of object b.
if( Yote::ObjProvider::xpath_count( $obj_a, $obj_b ) ) {
Stows all objects that are marked as dirty. This is called automatically by the application server and need not be explicitly called.
Yote::ObjProvider::stow_all;
Eric Wolf
Copyright (C) 2012 Eric Wolf
This module is free software; it can be used under the same terms as perl itself.
To install Yote, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Yote
CPAN shell
perl -MCPAN -e shell install Yote
For more information on module installation, please visit the detailed CPAN module installation guide.