Name : perl-Class-DataStore
| |
Version : 0.07
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 10.27
| Date : 2024-02-14 21:23:45
|
Group : Development/Libraries/Perl
| Source RPM : perl-Class-DataStore-0.07-10.27.src.rpm
|
Size : 0.01 MB
| |
Packager : (none)
| |
Summary : Generic OO data storage/retrieval
|
Description :
Class::DataStore implements a simple storage system for object data. This data can be accessed via get/set methods and AUTOLOAD. AUTOLOAD calls are not added to the symbol table, so using get/set will be faster. Using AUTOLOAD also means that you will not be able to store data with a key that is already used by a instance method, such as \"get\" or \"exists\".
This module was written originally as part of a website framework that was used for the Democratic National Committee website in 2004. Some of the implementations here, such as get() optionally returning a list if called in array context, reflect the way this module was originally used for building web applications.
Class::DataStore is most useful when subclassed. To preserve the AUTOLOAD functionality, be sure to add the following when setting up the subclass:
use base \'Class::DataStore\'; *AUTOLOAD = \\&Class::DataStore::AUTOLOAD;
This module is also a useful add-on for modules that need quick and simple data storage, e.g. to store configuration data:
$self->{_config} = Class::Datastore->new( $config_data ); sub config { return $_[0]->{_config}; } my $server = $self->config->server; my $sender = $self->config->get( \'sender\' );
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-C/openSUSE_Tumbleweed/noarch |