Catman...:vacuum(3pm)
β¨ NAME β¨
Catmandu::Fix::vacuum β bestie, this one deletes all the empty fields from your data. all of them. gone. bye π
It's a Perl module, and it's a <em>Fix</em>, which means you drop it into your Catmandu fix pipeline and it just does its thing.</em>
πΈ SYNOPSIS πΈ
okay so picture this: you've got data with some absolutely dead-weight fields in it. empty string, empty array, empty hash β the whole sad little trio of nothingness. and then vacuum() rolls up and clears the room. π§Ήβ¨
# Delete all the empty fields
#
# input:
#
# foo: ''
# bar: []
# relations: {}
# test: 123
#
vacuum()
# output:
#
# test: 123
#
see how foo, bar and relations were all sitting there contributing absolutely nothing to society? yeah. they're not invited anymore. the only survivor is test: 123, because 123 is a real one and it ate. π₯
so like, vacuum() takes no arguments β it's not that kind of girl, it needs no instructions β it just looks at your record and removes every field whose value is empty.
π¦ SEE ALSO π¦
Catmandu::Fixβ the whole fix framework this lil guy lives inside. go read it, iykyk π«Ά
and that's the whole page, no cap!! this one's from the User Contributed Perl Documentation, riding on perl v5.40.1, dated 2026-01-24. π thanks for reading bestie, go forth and vacuum ur data, you're gonna 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