Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Single file oriented for different usage

by clinton (Priest)
on Feb 27, 2008 at 12:27 UTC ( #670609=note: print w/ replies, xml ) Need Help??

in reply to Single file oriented for different usage

Take a look at Config::Merge (my module) which loads configuration from a directory tree of files in any of several formats (XML, YAML, ini, Perl, Config::General), merging them together into a single hash.

It has a second phase, that of merging in local overrides - you can override single hash keys, single elements in arrays, or whole sub-trees within the config. The default setup merges in a file called local.$file_type at the point where it finds it in the directory tree. However, in the examples, I show how you could customise this process to load this data based on (eg) host name, or whatever else tickles your fancy



Comment on Re: Single file oriented for different usage
Download Code
Re^2: Single file oriented for different usage
by doc_faustroll (Scribe) on Feb 27, 2008 at 19:17 UTC
    Nice module, Clint. And it is documented in an exemplary way.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-08-30 14:19 GMT
Find Nodes?
    Voting Booth?

    The best computer themed movie is:

    Results (293 votes), past polls