Catman...::valid(3pm)

πŸ“¦
version 1.2025 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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