Catman...:clone(3pm)

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

✨ Catmandu::Fix::clone ✨

okay bestie, welcome to the Catmandu::Fix::clone page πŸ’– this is the Perl fix you're looking for when you want a whole separate copy of your data object to mess with, no strings attached. yes it's filed under User Contributed Perl Documentation, yes it's a 3pm page, and yes it's giving exactly what it needs to give 🫢


πŸ’… NAME πŸ’…

Catmandu::Fix::clone β€” create a clone of the data object 🧬✨

that's it. that's the whole job. it clones. it does not elaborate. iconic behaviour tbh πŸ‘‘


🌸 SYNOPSIS 🌸

okay so here's the vibe, copy-paste ready, don't touch the code bestie:

# Create a clone of the data object
clone()

# Now do all the changes on the clone
add_field(foo, 2)

so first you call clone() to spin up a clone of the data object 🌈, and then β€” and this is the fun part β€” you do all the changes on the clone instead of the original. add_field(foo, 2) is just showing you what that looks like: you edit the clone, you keep the original safe and unbothered. main character clone, supporting-cast original πŸ’…

ngl this is the "make a copy before you go feral editing" move and it's lowkey the most responsible thing you'll do all day fr fr πŸ’–

πŸ¦‹ SEE ALSO πŸ¦‹

  • Catmandu::Fix β€” go here for the whole fix family, this clone is just one of the siblings πŸ’œ

and that's the page!! no cap, that was genuinely it πŸŽ€

perl v5.40.1 Β· 2026-01-24 Β· mwah, go clone something and stay hydrated πŸ’–πŸ’…βœ¨πŸ“

πŸ“¦ where this page comes from