Catman..._array(3pm)
β¨ NAME β¨
Catmandu::Fix::set_array β bestie, this one adds or changes the value of a HASH key or an ARRAY index and makes it an array π
Oh also, this whole page lives in the User Contributed Perl Documentation section, so if you went looking for it under Catman..._array(3pm)β¦ yeah that's the same girl, just with a cropped name π
π¦ DESCRIPTION π¦
Okay so here's the tea, and it's a big one π
Unlike add_field, this fix will not create the intermediate structures if they're missing. Nope. Not doing it. She said "if it's not already there, that's not my problem" π
So likeβ¦ the path has to already exist, or she's just not gonna build it for you. Not her job, not her shift, no cap π
πΈ SYNOPSIS πΈ
# Change the value of 'foo' to an empty array
set_array(foo)
# Or an array with initial contents
set_array(foo, "a", "b", "c")
Look at her go β¨ First form: set_array(foo) and boom, foo is now an empty array π«Ά Second form: set_array(foo, "a", "b", "c") and now foo is an array that already has "a", "b", and "c" sitting in it like the little icons they are π
No extra keys invented, no sneaky structures spawned. She only touches what's already on the map, fr fr π
π SEE ALSO π
Catmandu::Fixβ go read that one too, she's the main character and this one is literally her supporting cast π§
k byeeee, this was perl v5.40.1, dated 2026-01-24, straight from the User Contributed Perl Documentation section πβ¨
π¦ 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