Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Config::Framework 2.5

    Download button

    No screenshots available
    Downloads: 388  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Andrew N. Hicox | More programs
    Perl Artistic License / FREE
    September 27th, 2006, 03:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Config::Framework description

    A Perl module with handy one-stop shopping for (most) of your configuration file needs.

    Config::Framework is a Perl module with handy one-stop shopping for (most) of your configuration file needs.

    SYNOPSIS

    #create a new object, load two configuration files and decrypt the passwords. my $Object = new Config::Framework( Files => ['ApplicationCfg.xml','UserCfg.xml'], GetSecure => 1 ) || die $Config::Framework::errstr;

    #change some data in one of the loaded configs $Object->{'UserCfg'}->{'backgroundColor'} = '#00CCFF';

    #write that change back to the file you loaded it from $Object->WriteConfig(configNamespace => "UserCfg") || die $Object->{'errstr'};

    #Define a new configuration namespace %{ $Object->{'newConfig'} } = ( 'configNamespace' => "newConfig", 'protectNamespace' => 1, 'Version' => 1, #arbitrary data keys follow 'backgroundColor' => '#006699', 'getRecords' => 10, 'followLinks' => 1, 'someThing' => "in a bag" );

    #Write your new configuration data out to an encrypted file #under the application's ApplicationFramework directory $Object->WriteConfig( configNamespace => "newConfig", Encrypt => 1, Crypt => "Rijndael", Key => "l33tp4sw3rd" File => "$Object->{'FrameworkDir'}/newConfig.xml" ) || die $Object->{'errstr'};

    At long last I have decided to re-write the documentation for Config::Framework, in a manner which should be comprehensible by people other than myself. I would like to offer my sincerest appologies to anyone who tried to comprehend the sprawling stream-of-consiousness rant that was the previous 'documentation'. I'm sorry, I wasn't trying to make you insane. Now on with the show.

    Ok so what is Config::Framework? It's a handy module for dealing with situations where you need your program to be able to load external data from a file that controls how your program operates. I'm talking about configuration files here. So what do you do in a situation like that? Well you figure out a format to store your configuration parameters in, then write routines to read that format and put it some sort of meaningful data structure, and to write data from the data structure back out to the file.

    Wouldn't it be nice if someone defined a standard config file format so that you wouldn't need to write your own parser? Well in the end, all a config file really is, is an arbitrary data structure expressed in in ascii. A standard way of serializing data structures in ascii you say? That sounds a bit like XML! Well the Data::DumpXML module will serialize perl data structures into XML and restore them for you, and you could certainly dump that to a file easily enough.
    Ok getting to the point. The main thing that Config::Framework does for you is to define a standard data structure (or at least some standard guidelines for your data structure) and then front-ends Data::DumpXML so that you can arbitrarily dump and restore these data structures to files.

    While we're at it, Config::Framework aspires to be your 'one-stop-shop' for config-type-stuff, by helping you stay organized in the way you handle external configuration data


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    one-stop shopping | configuration file needs | Perl module | Config | one-stop | shopping

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM