use MooseX::Storage; with Storage( format => [ JSONpm => { json_opts => { pretty => 1 } } ], io => "File", );