Subject: | Wish: fetchrow_hashref_ordered to preserve column ordering |
fetchrow_hashref returns a hash mapping name to value. Because hash keys
are unordered this loses the original column ordering from the query.
You can reconstruct it using the NAME attribute but it would be handy for
DBI to have a method returning a hash with ordered keys, using
Tie::IxHash.
I imagine it would be called fetchrow_hashref_ordered and would work just
as fetchrow_hashref, except it would return a reference to a Tie::IxHash
tied hash where the key ordering is the same as that given by NAME.
If you like the idea I could write a patch?