in reply to Re^6: Keeping Order with YAML::XS (sort keys)
in thread Keeping Order with YAML::XS
You completely lost me with what your examples were demonstrating. But since Perl hashes offer no ordering guarantees, YAML::XS and YAML::Tiny should feel free to sort the keys however they wish before output.
Since Perl has no native ordered mapping, one from CPAN (or elsewhere) must be used. And by necessity it will have to be morphed into an array of individual hash maps before it can be sent out to YAML, and the process reversed upon load. Either that or one must be content to just operate on an array of hash maps directly in code... ugh
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Keeping Order with YAML::XS (sort keys)
by Anonymous Monk on Jul 29, 2013 at 10:05 UTC | |
by Loops (Curate) on Jul 29, 2013 at 10:32 UTC | |
by Anonymous Monk on Jul 29, 2013 at 11:08 UTC |