perl の CGI でコンフィグを外部ファイルに別ける

とりあえず、

{
    "test1" => "hoge",
    "test2" => "foo",
};

みたいなファイルを用意して、
test-conf みたいなファイル名で保存して、

my $config = require 'test-conf';

で使える。使い方は、

print $config->{"test1"}; #hoge

っす


メモメモ。