text: Greetings, fellow monks.
  I am currently working on a project that, like every other project, needs a config file.
  I've read about a few options for handling the need for config files - from building a parse for name=value pairs to just having a config.pm that has all my configuration stuff inside it, to using Config::foo, and so on.
  Long story short, I'm no longer certain which format to use(or how to accomplish it).
  I need the config file to be able to contain Perl code, which means I can't use the first method I mentioned.
  However, I'd also like it to insinuate its data into a global %config hash - so that I can refer to it from anywhere within my collection of scripts by simple doing this:
  use config;
  print $config{foo};
  [download]
  Does anyone have any recommendations on how to implement this in Perl, or a module I could use that would help me accomplish this?
  Thanks,
  Spidy
  When my answer to #1 was admins who knew Apache and the answer to #2 was Apache-style config blocks I created Config::ApacheFormat.
  If you're feeling particularly ambivalent you might use Data::PhraseBook which will let you pick one format today and switch tomorrow without changing the code that uses the configs.
  Another option for the undecided is Config::Auto. It may well be too clever for its own good but at least it tries hard!
  Once you've picked a parser writing some glue code to populate a global %CONFIG (don't use %Config since that's what the core Config module uses and you'll probably need it someday) should be easy. If it's not, pick another module!
  -sam
  You might be interested in a poll, My preferred way of handling config data in Perl is:
  If you really have to have Perl code in your config file, then the simplest solution is a file you can do or require. In fact, that option got the most votes in the poll I just referenced.
  %config = (
  foo => bar,
  bat => baz,
  );
  [download]
  I think maybe you're looking for Exporter. With it, you can have a module that will place a variable into the namespace of a program that uses it.
  You might want to look at YAML::Tiny. This module uses a subset of YAML that is easily understood by a reasonably intelligent non-geek and can handle name/values, lists, text blocks and can be commented.
  You can retreive the data as a hash as you require, and although I havn't tried it, you should be able to include blocks of Perl code that you can eval.
  Drop dead simple use, and the config file format is dead simple too.
  The config file format supports a cascading flow, so we put config keys and values that apply to every implementaion in the "master" section, and Win, OSX, Linux etc. specific keys in those separate sections, and use the file everywhere.
  Dark
  Milk
  White
  Alcoholic
  Nutty
  Fruity
  Biscuity
  Gingery
  Spreadable
  Drinkable
  Moussed
  Alternative e.g. Carob
  None
  Other kind
  Results (777 votes),
  past polls