Skip to content

Inconsistent with Catalyst - CATALYST_CONFIG #6

@Altreus

Description

@Altreus

Catalyst will use CATALYST_CONFIG as well as ${NAME}_CONFIG; and if it is set, it will also look for the _local file next to it.

Setting CATALYST_CONFIG has no effect on Config::ZOMG, and setting env_lookup didn't seem to achieve the desired effect.

my $c = Config::ZOMG->new( env_lookup => 'CATALYST_CONFIG' )->load;
use Data::Dump; dd $c;
{}

What did work was to set name => "Catalyst", but then of course, ${NAME}_CONFIG no longer works with the original value of name.

use Config::ZOMG;
my $c = Config::ZOMG->new( name => "Catalyst" )->load;
use Data::Dump; dd $c;

do {
  my $a = {
  #snip

I have been using CATALYST_CONFIG exclusively in all of our Docker environments so I don't have to know which specific variable I have to override in each container; but any process using Config::ZOMG to avoid loading the entire Catalyst application therefore cannot find the config without hijinks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions