Catman...:import(3pm)

πŸ“¦
version 1.2025 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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