Catman...:assoc(3pm)
β¨ NAME β¨
Catman...:assoc β it's a Catmandu::Fix thingy that takes two values and glues them together as a hash key and its value π (manual name's Catman...:assoc(3pm), if you're keeping receipts, and it lives in the User Contributed Perl Documentation fam).
π SYNOPSIS π
okay so here's the whole vibe, bestie β you feed it a bunch of pairs, and it turns each key + val duo into an actual hash entry π¦
# {pairs => [{key => 'year', val => 2009}, {key => 'subject', val => 'Perl'}]}
assoc(fields, pairs.*.key, pairs.*.val)
# {fields => {subject => 'Perl', year => 2009}, pairs => [...]}}
like?? it just works β¨ the pairs array stays exactly where it is, but now you've also got a shiny fields hash with subject and year all cozy inside it π
π SEE ALSO π
Catmandu::Fixβ go say hi, it's the parent energy here π«Ά
that's the whole page fr fr, short and iconic, no notes πΈ
signing off with love: this lil doc is from perl v5.40.1, dated 2026-01-24 β slay ππ
π¦ 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