App::RepositoryObject - Interface for data persistence
use App::RepositoryObject; ...
A RepositoryObject is an object whose state is stored in a repository. It is a base class for many business classes.
All RepositoryObjects are created using the $rep->get_object() or $rep->get_objects() methods, and they all have the following attributes.
$self->{_repository} - the Repository which the object came from $self->{_table} - the table name associated with the object $self->{_key} - the unique identifier of the object in the table in the repository
I am considering adding the following standard attribute, but I have not yet decided whether I should.
$self->{_context} - the Context the object is running in
* Signature: $value = $obj->get($attrib); * Signature: $value = $obj->get($attrib, $options); * Param: $attrib string,ARRAY * Return: $value any,ARRAY * Throws: App::Exception * Since: 0.01 Sample Usage: $value = $obj->get($attrib);
Gets the value of one or more attributes of an object.
* Signature: $obj->set($attrib, $value); * Signature: $obj->set($attrib, $value, $options); * Param: $attrib string,ARRAY * Param: $value any,ARRAY * Param: $options any,ARRAY * Throws: App::Exception * Since: 0.01 Sample Usage: $obj->set($attrib, $value);
Sets the value of one or more attributes of an object.
* Signature: $obj->delete(); * Signature: $obj->delete($options); * Param: $options ARRAY * Throws: App::Exception * Since: 0.01 Sample Usage: $obj->delete();
Deletes the object out of the repository.
* Signature: $obj->_init(); * Param: void * Return: void * Throws: App::Exception * Since: 0.01 Sample Usage: $obj->_init();
This method initializes the values of a newly created object. The default implementation on the App::RepositoryObject base class does nothing. It is provided so that it may be overridden in a subclass if desired.
* Author: Stephen Adkins <spadkins@gmail.com> * License: This is free software. It is licensed under the same terms as Perl itself.
App::Context, App::Repository
App::Context
App::Repository
To install App::Repository, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Repository
CPAN shell
perl -MCPAN -e shell install App::Repository
For more information on module installation, please visit the detailed CPAN module installation guide.