Hi!
Her is little test script:
--
use 5.010;
use strict;
use Data::Dumper;
use Config::Any::Merge;
my @filepaths = qw|conf/common.json conf/config.yml|;
my $cfg = Config::Any->load_files({ files => \@filepaths });
say Dumper $cfg;
--
Outoput for my test case:
$VAR1 = [
{
'conf/common.json' => {
'DBI' => [
'DBI:mysql:database=delcampe:mysql_enable_utf8=1',
'***********',
'***********',
{
'AutoCommit' => '1',
'RaiseError' => '1',
'PrintError' => '1'
}
]
}
},
{
'conf/config.yml' => {
'engines' => {
'template_toolkit' => {
'encoding' => 'utf8'
}
},
'plugins' => {
'DBIC' => {
'bookstore' => {
'dsn' => 'dbi:SQLite:dbname=bookstore.db',
'dbi_params' => {
'sqlite_unicode' => 1
}
}
}
},
'template' => 'template_toolkit',
'charset' => 'UTF-8',
'appname' => 'bookstore',
'layout' => 'main',
'logger' => 'console'
}
}
];
I expected more like this:
$VAR1 = {
'DBI' => [
'DBI:mysql:database=delcampe:mysql_enable_utf8=1',
'***********',
'***********',
{
'AutoCommit' => '1',
'RaiseError' => '1',
'PrintError' => '1'
}
]
}
'engines' => {
'template_toolkit' => {
'encoding' => 'utf8'
}
},
'plugins' => {
'DBIC' => {
'bookstore' => {
'dsn' => 'dbi:SQLite:dbname=bookstore.db',
'dbi_params' => {
'sqlite_unicode' => 1
}
}
}
},
'template' => 'template_toolkit',
'charset' => 'UTF-8',
'appname' => 'bookstore',
'layout' => 'main',
'logger' => 'console'
}
};
--
With best reagrds,
Gunnar