Config::Generalは構文がプログラマーには美しくないのだけど、YAMLはインデントが必要!という事がわからないとコピペして設定を使い回す人が困るという問題があるんだよね、と一応前提を言って置いて・・・

soffritto::journal

なんでConfig::Generalをあきらめたかというと、

   connect_info dbi:mysql:myapp
   connect_info username
   connect_info mypassword

のあとにどうやってmysql_enable_utf8 => 1を書いたらいいか分からなかったから><

そういう場合はこうするとよいと思うのです:
use strict; use Config::General; use Data::Dumper; my $string = <<EOM; connect_info dbi:mysql:dbname=hoge connect_info username connect_info password <connect_info> mysql_enable_utf8 1 </connect_info> EOM my $cfg = Config::General->new(-String => $string); print Dumper({ $cfg->getall }); # 結果 $VAR1 = { 'connect_info' => [ 'dbi:mysql:dbname=hoge', 'username', 'password', { 'mysql_enable_utf8' => '1' } ] };