Main > Programming > Libraries >

PXP::Config 0.1.2

PXP::Config 0.1.2

Sponsored Links

PXP::Config 0.1.2 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.014 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 1150
Date added: 2006-09-19
Publisher: PXP::Config Team

PXP::Config 0.1.2 description

PXP::Config is a Perl module for PXP configuration.

SYNOPSIS

# do this only once at server initialization:
PXP::Config::init(file=>$finename);
# then from anywhere:
my $global_configuration_hash = PXP::Config::getGlobal();
# only from a plugin class:
my $plugin_configuration_hash = PXP::Config::get();

PXP::Config is a PXP component which provides a unified and simplified API for the PXP server and PXP plugins to read and store there configuration.

PXP::Config uses the XML::Simple module to access a centralized XML configuration file. This file (/opt/etc/imc.xml by default) contains root element named imc which has a global child for the PXP server configuration and a plugins child which has itself a child per plugin configuration (the child name must be the plugin name for this class to automatically retrieve a plugin configuration.

As plugins configurations are retrived by plugin name in a centralized location, the only thing a plugin has to do in order to get its configuration is to call the PXP::Config::get() method which returns a hash convertion of the plugin XML configuration.

Configuring plugins can be made in two manners:

1) the simple way - use it when you dont need to update the configuration from the application itself and when your plugin configuration has a very simple structure:
simply add a tag with the name of your plugin in the etc/imc.xml file, the plugin configuration can then be accessed as a has by calling the PXP::Config::get() method
2) the sophisticated way - use it in other cases:
create a new package in a file MyConfig/PLUGIN_NAME.pm under your plugin directory
in this file, define a package that inherits from PXP::MyConfig class and which overrode the config, loadFile and synchro methods (see plugins/LogViewer/MyConfig/LogViewer.pm for an example)

edit your plugin.xml and add your new package as an extension to the PXP::MyConfig extension point:

< extension
id="MyConfig::LogViewer"
name="Plugin configuration"
version="0.1"
point="IMC::MyConfig"/ >

< file value=/tmp/imc.xml/ >

< /extension >

You can ommit the file tag, configuration file will then default to the main configuration file (the one passed to the server with the -c switch or etc/imc.xml by default).

See the PXP::Config and PXP::MyConfig APIs for using configuration inside plugins.

PXP::Config 0.1.2 Screenshot

Advertisements

PXP::Config 0.1.2 Keywords

Bookmark PXP::Config 0.1.2

Hyperlink code:
Link for forum:

PXP::Config 0.1.2 Copyright

WareSeeker periodically updates pricing and software information of PXP::Config 0.1.2 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of PXP::Config 0.1.2 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Gimp::Config is a Perl module with config options found during configure time. Free Download
Config::Std is a Perl module load and save configuration files in a standard format. Free Download
Rsync::Config is a Perl module for rsync configuration generator. Free Download
DBIx::Wrapper::Config Perl module allows the use of a configuration file in XML specifying information. Free Download
DNS::Config is a Perl module with DNS Configuration. Free Download
dtRdr::Config is a Perl module with Factory class for configuration system. Free Download
Apache::MyConfig is a Perl module created to build options access. Free Download
App::Conf::File is a Perl module to load and access configuration data. Free Download