Catman...::DKVP(3pm)
β¨ NAME β¨
Catmandu::Importer::DKVP β it's the Delimited Key-Value Pairs importer, bestie π
and yes she lives in the User Contributed Perl Documentation section of your manual, page Catman...::DKVP(3pm) if you're keeping receipts.
π¦ DESCRIPTION π¦
Okay so this package imports text files full of delimited key-value pairs. That's it, that's the whole vibe. Every line is a little bundle of key=value moments, separated by commas, and she eats them up and hands you back tidy records. No cap.
Here's literally what the input looks like:
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
See? Keys on the left, values on the right, commas holding it all together like a group chat. π«Ά
π CONFIGURATION π
Two little knobs, both iconic, both customizable:
sep_charβ the character that separates fields from each other. Default is",". So like, if you're feeling spicy and want semicolons or whatever, this is your girl.pair_sep_charβ the character that separates key-value pairs, i.e. the thing sitting between the key and its value. Default is"=". Change it if=isn't giving what it needs to give.
π METHODS π
Every Catmandu::Importer is a Catmandu::Iterable, and all their methods are inherited. So whatever your importer can do, this one can do too β she's got main character energy by association, periodt. π
π SEE ALSO π
Miller β and here's the link, character for character, because I don't make the rules:
http://johnkerl.org/miller/doc/file-formats.html#DKVP:_Key-value_pairs
k bye bestie, this page was brought to you by perl v5.40.1, dated 2026-01-24, and the whole Catman...::DKVP(3pm) moment. go slay some delimited data πβ¨
π¦ where this page comes from
- ubuntu resolute: libcatmandu-perl 1.2025-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-perl 1.2025-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms