Catman...:clone(3pm)
β¨ 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
- 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