Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Config::Objective 0.9.1

    Download button

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

    License / Price:

    Last Updated:

    Category:
    Mark D. Roth | More programs
    Perl Artistic License / FREE
    May 24th, 2010, 19:11 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Config::Objective description

    Perl module for parsing object-oriented config files

    Config::Objective is a Perl module that provides a mechanism for parsing config files to manipulate configuration data. Unlike most other config file modules, which represent config data as simple variables, Config::Objective represents config data as perl objects. This allows for a much more flexible configuration language, since new classes can be easily written to add methods to the config syntax.

    The Config::Objective class supports the following methods:

    new()

     The constructor. The first argument is the filename of the config file to parse. The second argument is a reference to a hash that maps names to configuration objects.

     The remaining arguments are interpretted as a hash of attributes for the object. Currently, the only supported attribute is include_dir, which specifies the directory to search for include files (see "File Inclusion"). If not specified, include_dir defaults to ".".

    object_name

     Once the constructor parses the config file, you can call the get() method of any of the objects by using the object name as an autoloaded method (see "Recommended Methods").

    get_obj()

     Returns a reference to the object of the specified object name. The object name is the first argument.

    obj_names()

     Returns a list of known object names.

    get_hash()

     Returns a hash where the keys are the known object names and the values are the result of calling the get() method on the corresponding object.

    SYNOPSIS

     use Config::Objective;
     use Config::Objective::String;
     use Config::Objective::List;

     my $conf = Config::Objective->new('filename',
     {
     'var1' => Config::Objective::String->new(),
     'var2' => Config::Objective::List->new(),
     ...
     },
     'include_dir' => '/usr/local/share/appname');

     print "var1 = \"" . $conf->var1 . "\"\n";



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    configuration parser | Perl module | Perl | configuration | parser

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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