Catman...:import(3pm)
π Catman...:import(3pm) π
okay bestie, gather round β this is a page from the User Contributed Perl Documentation, and it's literally the cutest lil fix you ever did see. We're talking about Catmandu::Fix::import, and no cap, it does exactly one job and it does it flawlessly. β¨
πΈ NAME πΈ
Catmandu::Fix::import β change the value of a HASH key or ARRAY index by replacing its value with imported data π¦
Like, that's the whole vibe. You got a key in a HASH, or an index in an ARRAY, and it's sitting there with some value? Not anymore. We're swapping that value out for imported data. It's giving glow-up. It's giving main character energy. π
β¨ SYNOPSIS β¨
Here's the moment you've all been waiting for, the way that it actually looks in the wild:
import(foo.bar, JSON, file: "http://foo.com/bar.json", data_path: data.*)
Read it with me: you're calling import, you're pointing it at foo.bar, you're saying the format is JSON, you're handing it a file: of "http://foo.com/bar.json", and you're telling it where the good stuff lives with data_path: data.*. Iconic. No notes. π
π SEE ALSO π
Catmandu::Fixβ the parent, the blueprint, the moment. Go read it, fr fr. π«Ά
and that's the tea, bestie π this page is from the User Contributed Perl Documentation, running on perl v5.40.1, dated 2026-01-24. slay, you're done here πβ¨π
π¦ 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