in reply to Keeping Order with YAML::XS
FWWIAFAIR, YAML::Tiny produces that type of output, I thought maybe if married with Tie::IxHash it will preserve order? But looks like not
use YAML::Tiny qw/ Dump /; use Tie::IxHash; tie my(%hash), 'Tie::IxHash'; %hash = ( 'path' => '/export/home/frank', 'options' => [ { 'value' => '1001', 'param' => 'i' }, { 'param' => 'f' }, { 'value' => 'eyes', 'param' => 'x' }, {}, { 'value' => 'toes', 'param' => 'b' }, { 'param' => 'p' }, ], 'arguments' => [ { 'value' => 'test' } ], ); print Dump(\%hash); __END__ --- arguments: - value: test options: - param: i value: 1001 - param: f - param: x value: eyes - {} - param: b value: toes - param: p path: '/export/home/frank'
This is what I don't like about YAML, no yamltidy
|
|---|