Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

AppConfig

by BoredByPolitics (Scribe)
on Jan 22, 2001 at 00:01 UTC ( #53368=modulereview: print w/ replies, xml ) Need Help??

Item Description: The Swiss Army Knife of Config Param modules

Review Synopsis:

++

Extremely flexible handling of both configuration files, and commandline parameters.

Four parameter types - boolean, scalar, array and hash.

As each parameter is defined it can have various properties set, including DEFAULT setting, ACTION to take on use, VALIDATE based on regex or sub result, various types of variable EXPANDing, variable name ALIASes.

The properties DEFAULT, ACTION, VALIDATE, and EXPAND can be set globally as well as local to a parameter.

Can handle multiple sources of configuration file, including filehandles.

--

VALIDATEs which use a sub don't appear to trigger the return of a false value from the arg() method, although a warning to the user is printed.

ACTIONs cannot alter the value they're attached to, as this sets up a circular reference.

Overall

An extremely useful module which, although it takes a bit of time to get to know, is well worth the extra effort.

Comment on AppConfig
Re: AppConfig
by educated_foo (Vicar) on May 06, 2002 at 04:20 UTC
    For another delicious(ly full-featured) config option, you might try Resources. It's got more the flavor of X resources, with defaulting, inheritance, etc.

    /s

Re: AppConfig
by belg4mit (Prior) on Jun 16, 2002 at 01:57 UTC
    You neglect to mention the documentation, which, to put it mildly, is severly lacking.

    From what I can make out the interface also seems to be a little umm interesting. Namely having undefined methods default to getting a variable of the same name. This results in an inconsistent interface for fetching variables of the same name as an existing method...

    UPDATE: While trying to figure out how to use this module I came across this IBM tutorial.

    --
    perl -pew "s/\b;([mnst])/'$1/g"

      UPDATE: While trying to figure out how to use this module I came across this IBM tutorial.

      Outstanding follow-up with the reference, belg4mit++. Indeed, the documentation with the AppConfig module is a hard read. I fought it for several hours recently and it was an irritating experience.

          Soren/Intrepid

      -- 
      use PerlMonk::Tye qw(:wisely);
      

        Indeed, the documentation with the AppConfig module is a hard read.

        Maybe it's gotten better since then, but I haven't had any trouble with AppConfig's docs.
Re: AppConfig
by chicks (Scribe) on Aug 31, 2004 at 22:08 UTC
    Has anybody managed to come up with a way to use AppConfig's configuration to produce a usage message? Some sort of "here are the options and these are the defaults sort of thing".

Back to Reviews

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: modulereview [id://53368]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2014-12-28 05:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (178 votes), past polls