Catman...d::list(3pm)
π Catman...d::list(3pm) β bestie edition π
okay so this is the page for Catman...d::list(3pm), from the User Contributed Perl Documentation, and it's literally all about Catmandu::Fix::Bind::list. pull up a chair, grab a boba, we're doing this π§β¨
πΈ NAME πΈ
Catmandu::Fix::Bind::list β a binder that computes Fix-es for every element in a list
like. it's a binder. it binds. it does the thing to every single item in your list. iconic behavior honestly π
β¨ SYNOPSIS β¨
# Create an array:
# demo:
# - red
# - green
# - yellow
# Add a foo field to every item in the demo list, by default all
# fixes will be in context of the iterated path. If the context
# is a list, then '.' will be the path of the temporary context
# variable
do list(path:demo)
if all_equal(.,green)
upcase(.)
end
end
# This will result:
# demo:
# - red
# - GREEN
# - yellow
# Loop over the list but store the values in a temporary 'c' variable
# Use this c variable to copy the list to the root 'xyz' path
do list(path:demo,var:c)
copy_field(c,xyz.$append)
end
# This will result:
# demo:
# - red
# - GREEN
# - yellow
# xyz:
# - red
# - GREEN
# - yellow
so like, watch the green become GREEN. that's the glow-up fr fr π
π¦ DESCRIPTION π¦
The list binder will iterate over all the elements in a list and fixes the values in context of that list.
translation bestie: it goes one by one through every element, no skipping, no shortcuts, and applies your fixes in the context of that list. main character energy for each item π
π CONFIGURATION π
π path
The path to a list in the data.
π« var
The loop variable to be iterated over. When used, a magic temporary field will be available in the root of the record containing the iterated data.
β¨ "magic temporary field" is a direct quote, not me being dramatic for once. it lives in the root of the record, and it's holding your iterated data. treat it with respect π«Ά
π SEE ALSO π
Catmandu::Fix::Bind
and that's the whole page, you ate it, no crumbs π
perl v5.40.1 Β· 2026-01-24 Β· Catman...d::list(3pm) β mwah, love u, go bind some lists ππ¦π
π¦ 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