FUNCTIONS

get_defaults

my $config = get_defaults(
    #defaults => \%Dancer::SearchApp::Defaults::defaults,
    #env      => \%ENV,
    config   => LoadFile( 'config.yml' ),
    
    names    => [
        # hash-name, config-name, env-name, (hard-default)
          [ Server   => 'server' => IMAP_SERVER => 'localhost' ],
          [ Port     => 'port'   => IMAP_PORT => '993' ],
          [ User     => 'username' => IMAP_USER => '' ],
          [ Password => 'password' => IMAP_PASSWORD => '' ],
          [ Debug    => 'debug'    => IMAP_DEBUG => 0 ],
    ],
);

Lame-ass config cascade

Read from %ENV, $config, hard defaults, with different names, write to yet more different names Should merge with other config cascade in Config::Collect