Linux SoftwareProgrammingLibrariesPXP::Config 0.1.2

PXP::Config 0.1.2


PXP::Config is a Perl module for PXP configuration. SYNOPSIS # do this only once at server initialization: PXP::Config::init(f
Developer:   PXP::Config Team
      more software by author →
Price:  0.00
License:   Perl Artistic License
File size:   14K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


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 don't 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.

Requirements:
  • Perl
    tags pxp config  plugin configuration  the pxp  imc xml  your plugin  plugin name  pxp myconfig  configuration file  the plugin  etc imc  config get  with the  hash pxp  

    Download PXP::Config 0.1.2


     http://mirrors.evolva.ro/CPAN/authors/id/D/DB/DBARTH/PXP-0.1.2.tar.gz


    Authors software

    PXP::Config 0.1.2 (by PXP::Config Team)
    PXP::Config is a Perl module for PXP configuration.

    SYNOPSIS

    # do this only once at server initialization:
    PXP::Config::init(f


    Similar software

    PXP::Config 0.1.2 (by PXP::Config Team)
    PXP::Config is a Perl module for PXP configuration.

    SYNOPSIS

    # do this only once at server initialization:
    PXP::Config::init(f

    The Kava Telnet Application 1.0 (by Alison Winters)
    The KTA is a complete telnet and SSH application designed for use by both end-users and developers

    AxKit2::Plugin 1.1 (by AxKit2::Plugin Team)
    AxKit2::Plugin is a base class for all plugins.

    An AxKit2 plugin allows you to hook into various parts of processing requests and

    Audio::LADSPA::Plugin 0.018 (by Joost Diepenmaat)
    Audio::LADSPA::Plugin is a base class for LADSPA plugins in Perl.

    SYNOPSIS

    use Audio::LADSPA;

    my (@plugin_classes) =

    Template::Plugin::XML 2.16 (by Andy Wardley)
    Template::Plugin::XML is a XML plugin for the Template Toolkit.

    SYNOPSIS

    [% USE XML;
    dom = XML.dom('foo.xml');

    XMMS Root Visualization Plugin 0.0.8 (by Johannes Jordan)

    Pipeline::Config 0.05 (by Steve Purkis)
    SYNOPSIS

    use Error qw( :try );
    use Pipeline::Config;

    my $config = Pipeline::Config->new();

    try {
    my $pipe =

    Mapasuta openArchitectureWare WorkFlow Runner 1.1 (by The Mapasuta Development Group)

    Object::Meta::Plugin::Host 0.01 (by Yuval Kogman)
    Object::Meta::Plugin::Host are hosts plugins that work like Object::Meta::Plugin

    NPGPX 0.1.1 (by Lars Luthman)
    This is a Netscape plugin that can display routes, tracks, and waypoints from a GPX file


    Other software in this category

    zlib 1.2.3 (by Jean-loup Gailly)
    zlib is designed to be a free, general-purpose, legally unencumbered, lossless data-compression library for use on virtually any comp

    libjpeg v6b (by Independent JPEG Group)
    libjpeg is a library for handling the JPEG (JFIF) image format

    OpenSSL 0.9.7c (by The OpenSSL Project Team)
    The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implement

    libxml2 2.6.27 (by DV)
    Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), libxml2 library i

    GNU C library 2.4 (by Andreas Jaeger)
    GNU C library (glibc) is one of the most important components of GNU Hurd and most modern Linux distributions.

    GNU C library is us

  •     search


    Featured Software

    jEdit 4.3 pre8
    jEdit is an Open Source text editor written in Java

    Opera 9.02
    Surf the Internet in a safer, faster, and easier way with Opera browser

    GNU Aspell 0.60.4
    GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


    Subscribe in Rojo
    Google Reader
    Add to My Yahoo!

    Add to My AOL
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    Add 'nixbit linux software' to Newsburst from CNET News.com
    del.icio.us nixbit linux software


    Top tags