Catman...:expand(3pm)

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

πŸ’… NAME πŸ’…

Catmandu::Fix::expand β€” bestie, this one takes a flat hash and turns it back into nested data, using the TT2 dot convention. That's the whole vibe. No cap. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

Okay so here's the whole flex, look:

# collapse the data into a flat hash
collapse()

# expand again to the nested original
expand()

# optionally provide a path separator
collapse(sep: '/')
expand(sep: '/')

See how it goes? You collapse() it down flat, then expand() it right back to the nested original like nothing ever happened. Glow-up AND glow-down. 🫢 And if you're feeling fancy, you can hand it a path separator with sep: β€” like sep: '/' β€” on either one. Iconic behavior fr fr. πŸŽ€


🌸 SEE ALSO 🌸

  • Catmandu::Fix β€” the main character, the parent of it all. Go say hi. πŸ‘‘

Real talk bestie: this page lives in the User Contributed Perl Documentation collection, and it's from the perl v5.40.1 era, dated 2026-01-24. Slay, that's a wrap. πŸ’–πŸŒˆβœ¨
πŸ“¦ where this page comes from