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.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    CGI::Ex::Conf 2.32

    Download button

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

    License / Price:

    Last Updated:

    Category:
    Paul Seamons | More programs
    Perl Artistic License / FREE
    October 7th, 2006, 08:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    CGI::Ex::Conf description

    A Perl module with Conf Reader/Writer for many different data format types

    CGI::Ex::Conf is a Perl module with Conf Reader/Writer for many different data format types.

    SYNOPSIS

    use CGI::Ex::Conf qw(conf_read conf_write);

    my $hash = conf_read("/tmp/foo.yaml");

    conf_write("/tmp/foo.yaml", {key1 => $val1, key2 => $val2});


    ### OOP interface

    my $cob = CGI::Ex::Conf->new;

    my $full_path_to_file = "/tmp/foo.val"; # supports ini, sto, val, pl, xml
    my $hash = $cob->read($file);

    local $cob->{default_ext} = 'conf'; # default anyway


    my @paths = qw(/tmp, /home/pauls);
    local $cob->{paths} = @paths;
    my $hash = $cob->read('My::NameSpace');
    # will look in /tmp/My/NameSpace.conf and /home/pauls/My/NameSpace.conf


    my $hash = $cob->read('My::NameSpace', {paths => ['/tmp']});
    # will look in /tmp/My/NameSpace.conf


    local $cob->{directive} = 'MERGE';
    my $hash = $cob->read('FooSpace');
    # OR #
    my $hash = $cob->read('FooSpace', {directive => 'MERGE'});
    # will return merged hashes from /tmp/FooSpace.conf and /home/pauls/FooSpace.conf
    # immutable keys are preserved from originating files


    local $cob->{directive} = 'FIRST';
    my $hash = $cob->read('FooSpace');
    # will return values from first found file in the path.


    local $cob->{directive} = 'LAST'; # default behavior
    my $hash = $cob->read('FooSpace');
    # will return values from last found file in the path.


    ### manipulate $hash
    $cob->write('FooSpace'); # will write it out the changes


    There are half a million Conf readers out there. Why not add one more. Actually, this module provides a wrapper around the many file formats and the config modules that can handle them. It does not introduce any formats of its own.

    This module also provides a preload ability which is useful in conjunction with mod_perl.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Conf Reader | Conf Writer | Perl module | CGI::Ex::Conf | Conf | Reader

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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