--- CBOR-XS/XS.pm 2020/12/11 06:03:40 1.79 +++ CBOR-XS/XS.pm 2020/12/11 06:05:33 1.80 @@ -768,12 +768,16 @@ Treat the array reference as key value pairs and output a CBOR map. This allows you to generate CBOR maps with arbitrary key types (or, if you -don't care about semantics, duplicate keys or prairs in a custom order), +don't care about semantics, duplicate keys or pairs in a custom order), which is otherwise hard to do with Perl. The single argument must be an array reference with an even number of elements. +Note that only the reference to the array is copied, the array itself is +not. Modifications done to the array before calling an encoding fuinction +will be reflected in the encoded output. + Example: encode a CBOR map with a string and an integer as keys. encode_cbor CBOR::XS::as_map [string => "value", 5 => "value"]