Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer


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.


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

Replies are listed 'Best First'.
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.


      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 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.


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".
Log In?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2019-04-20 08:59 GMT
Find Nodes?
    Voting Booth?
    I am most likely to install a new module from CPAN if:

    Results (108 votes). Check out past polls.

    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!