--- Autrijus Tang <[EMAIL PROTECTED]> wrote: > On Tue, Apr 01, 2003 at 08:41:13AM +0200, Perl Authors Upload > Server wrote: > > Config::Merge merges configuration from at most three > sources. > > Is the maximum number of three an arbitary decision, or > required by your design?
That's the amount I always work with so I start from there. Extending the number of sources is in my future plan (as in the POD). > > application may allow users to define configuration in a > file, but > > you also have set predefined (default) configuration. At > the end you > > want single configuration by merging them with a certain > precedence. > > This module will do just that. > > What format of config does it take? If you use external config parser, then you follow the rules of the parser. The internal parser takes a plain teks file. It's meant for default parser on simple and common format, such as one pair of param=value per line (there's a section in the POD that explains the rules more detail). > > > Additionally, Config::Merge provides internal parser for > convenient > > and historical reason, but allows users to provide > external parser > > via CODE reference to suit their need. > > Can you differentiate your module from this? > > use Config::General; > my %merged = ( > ParseConfig('file1.cfg'), > ParseConfig('file2.cfg'), > ParseConfig('file3.cfg'), > ); This merges configuration from different files, Config::Merge merges configuration from different sources, one of them can be file. I think I can use above when I add capability to accept more than one file for "file" type (also in future plan). I have to add here that Config::Merge (currently) defines three types of configuration source: "default", "file", and "custom". "default" is some kind of predefined set of configuration, "file" is expected to contain configuration from parsed file, while "custom" can be arbitrary source. I usually use "cutom" to temporarily override the value in "file". thanks, ===== san -- __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://platinum.yahoo.com