CSAF::Validator(3pm)

πŸ“¦
version 0.26 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– CSAF::Validator πŸ’–

okay bestie, welcome to CSAF::Validator β€” the Conformance Validator from the CSAF::Validator(3pm) manual page. yes she's a Perl module, yes she's iconic, and yes she's about to vibe check your documents against a whole schema. let's get into it πŸ¦‹


✨ SYNOPSIS ✨

use CSAF::Validator;

my $v = CSAF::Validator( csaf => $csaf );
my @messages = $v->validate;

if ($v->has_error) {
    say "Validator errors";
    say $_ for (@messages);
}

like, that's the whole mood. you make a validator, you run validate, you print the messages if has_error is true. slay. πŸ’…


🌸 DESCRIPTION 🌸

so CSAF::Validator reads documents and does a check against the JSON schema (that's CSAF::Validator::Schema), and then it runs all the mandatory tests (CSAF::Validator::MandatoryTests), the optional tests (CSAF::Validator::OptionalTests), and the informative tests (CSAF::Validator::Informative). she does it ALL, no skips, no shortcuts. periodt. πŸ‘‘

now, the conformance profiles β€” these are like the different levels of thoroughness, and honestly? it's giving tier list:

  • CSAF basic validator: a program that reads a document and checks it against the JSON schema, plus performs the mandatory tests. the bare minimum but valid.
  • CSAF extended validator: a CSAF basic validator that additionally performs the optional tests. she's doing extra credit πŸ’–
  • CSAF full validator: a CSAF extended validator that additionally performs the informative tests. the final boss. main character energy. ✨

and here's the official spec link if you wanna read the source material:

<https://docs.oasis-open.org/csaf/csaf/v2.0/os/csaf-v2.0-os.html>


πŸŽ€ METHODS πŸŽ€

CSAF::Validator inherits all methods from CSAF::Validator::Base and implements the following new ones. so she's got family, but these are her own.

  • validate ( [$type] ) β€” runs all the validation tests of type "schema", "mandatory", "optional" and "informative", and returns all the validation messages. all of them. the whole pile. 🫢
my @messages = $v->validate;
say $_ for (@messages);

# Execute only the mandatory tests

my @messages = $v->validate('mandatory');
Carp::croak 'Validation error' if @messages;

like, you can run the whole suite, or you can pass a $type and be picky about it. both are valid. no cap. 😌


πŸ’œ SUPPORT πŸ’œ

πŸ› Bugs / Feature Requests

found a bug? got a feature request? pls pls pls report it through the issue tracker at:

<https://github.com/giterlizzi/perl-CSAF/issues>

and the bestie part: you'll be notified automatically of any progress on your issue. no refreshing, no refreshing anxiety, she's got you. 🌈

πŸ¦‹ Source Code

this is open source software, okay? the code repository is available for public review and contribution under the terms of the license. come look, come contribute, come be part of it πŸ’–

<https://github.com/giterlizzi/perl-CSAF>

git clone https://github.com/giterlizzi/perl-CSAF.git

clone it, love it, patch it. iykyk. ⭐


πŸ‘‘ AUTHOR πŸ‘‘

  • Giuseppe Di Terlizzi <gdt@cpan.org>

this software is copyright (c) 2023-2025 by Giuseppe Di Terlizzi.

it's free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, go forth and remix, bestie. 🧚


and that's the whole page!! no extra lore, no made-up facts, just vibes and every single detail preserved. πŸ’€βœ¨

okay bye ily, this was documented under perl v5.40.1, dated 2025-09-03, and it's the CSAF::Validator(3pm) page β€” stay validating, queen πŸŽ€πŸ’…πŸ”₯

πŸ“¦ where this page comes from