Catman...:retain(3pm)
π Catman...:retain(3pm) π
okay bestie, so this is a 3pm manual page β that's a Perl module doc, specifically for Catmandu::Fix::retain, contributed by the lovely Perl community. buckle up, it's short and it's iconic β¨
πΈ NAME πΈ
Catmandu::Fix::retain β literally just delete everything except the paths given. that's the whole vibe. it's the "you can stay, everyone else get OUT" of fix functions π
β¨ SYNOPSIS β¨
here's how you use her:
# Keep the field _id , name , title
retain(_id , name, title)
# Delete everything except foo.bar
# {bar => { x => 1} , foo => {bar => 1, y => 2}}
# to
# {foo => {bar => 1}}
retain(foo.bar)
so like, first example: you feed her _id, name and title, and she keeps those fields and yeets everything else into the void ποΈβ¨. iconic behavior honestly.
second example is giving nested-path main character energy: you pass foo.bar, and the input hash
{bar => { x => 1} , foo => {bar => 1, y => 2}}
becomes
{foo => {bar => 1}}
so foo.bar survives, and the stray bar at the top level plus the extra y inside foo? gone. not invited. blocked π«π¦
π SEE ALSO π
Catmandu::Fixβ the parent fix, the mother of all fixes, go say hi π«Ά
and that's the whole page fr fr, she's smol but she's powerful π
quick reminder bestie: retain is the strict queen β whatever you list is what stays, and everything you don't list gets deleted. so like, double-check your paths before you run it, because there's no undo button π
this page came from perl v5.40.1, dated 2026-01-24, and it's part of the User Contributed Perl Documentation for Catman...:retain(3pm). mwah, thanks for reading, slay πππ
π¦ 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