Catman...::valid(3pm)
π Catmandu::Fix::Condition::valid π
okay bestie, listen up β this little page is filed as Catman...::valid(3pm) in the User Contributed Perl Documentation, and its actual NAME is Catmandu::Fix::Condition::valid. she's the fix condition that executes fixes if the data passes validation. like, the bouncer at the club door, but make it schema-shaped. π
β¨ SYNOPSIS β¨
# reject all items not conforming to a schema
select valid('', JSONSchema, schema: "my/schema.json")
# check the author field
unless valid(author, JSONSchema, schema: "my/author.schema.json")
... # repair or give warning
end
so the first one? that's your "no schema match, no entry" move β select valid('', JSONSchema, schema: "my/schema.json") yeets every item that doesn't conform. harsh but iconic. β¨
and the second one is the soft-launch version: unless valid(author, JSONSchema, schema: "my/author.schema.json") β if the author field doesn't pass, you get to go in and ... # repair or give warning instead of just deleting the whole thing. healing era fr fr π«Ά
πΈ SEE ALSO πΈ
lowkey you should also check out Catmandu::Fix::validate β that's the one that actually checks and hands you back the validation errors, iykyk. π
and that's the whole page, bestie β no cap, that's genuinely all of it π
this lil guide came to you from perl v5.40.1, dated 2026-01-24 β she's Catman...::valid(3pm) and she ate, periodt. ππ¦
π¦ 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