XAO::DO::FS::Config - embeddable configuration object for XAO::FS
use XAO::Projects; use XAO::Objects; my $config=XAO::Objects->new(objname => 'Config', sitename => 'test'); XAO::Projects::create_project(name => 'test', object => $config, set_current => 1); my $fsconfig=XAO::Objects->new(objname => 'FS::Config', odb_args => { dsn => 'OS:MySQL_DBI:test_os' user => 'test', password => 'TeSt', }); $config->embed(fs => $fsconfig); my $odb=$config->odb();
The XAO::DO::FS::Config is normally used in larger projects configurations that are persistent in memory. See XAO::DO::Config for more information on how embeddable configuration objects work.
Disables use of odb() method to set a new value (this is the default state).
Used internally by global Config object, returns an array with embeddable method names. Currently there is only one embeddable method -- odb().
Enables use of odb() method to set a new value. Normally you do not need this method.
Example:
$config->enable_special_access(); $config->odb($odb); $config->disable_special_access();
Creates a new empty configuration object. If odb_args is given then it will connect to a database using these arguments.
my $fsconfig=XAO::Objects->new(objname => 'FS::Config', odb_args => { dsn => 'OS:MySQL_DBI:test_os' user => 'test', password => 'TeSt', });
Returns current database handler. If called with an argument and speciall access is enabled then replaces database handler.
Copyright (c) 1999-2001 XAO Inc.
The author is Andrew Maltsev <am@xao.com>.
Recommended reading: XAO::Web, XAO::DO::Config.
To install XAO::FS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XAO::FS
CPAN shell
perl -MCPAN -e shell install XAO::FS
For more information on module installation, please visit the detailed CPAN module installation guide.