Skip to content

Instantly share code, notes, and snippets.

@ilmari
Created September 2, 2011 16:08
Show Gist options
  • Save ilmari/1189026 to your computer and use it in GitHub Desktop.
Save ilmari/1189026 to your computer and use it in GitHub Desktop.
Config merge problem
plugins:
DBIC:
Foo:
schema_class: "MyApp::Schema"
options:
mysql_enable_utf8: 1
on_connect_call:
- "set_strict_mode"
OtherPlugin:
some_setting: bar
plugins:
DBIC:
Foo:
dsn: "dbi:mysql:foo"
user: 'foo'
pass: ''
# Plack::Middleware::Debug::Dancer::Settings shows the following config:
plugins => { "DBIC" => { Foo => { dsn => "dbi:mysql:foo", pass => "", user => "foo", }, "OtherPlugin" => { some_setting => "bar", }, }
# But what I want is:
plugins => { "DBIC" => { Foo => { dsn => "dbi:mysql:foo", pass => "", user => "foo", options => { mysql_enable_utf8 => 1, on_connect_call => ["set_strict_mode",], }, }, "OtherPlugin" => { some_setting => "bar", }, }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment