CSAF::Validator(3pm)
π 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>
πΈ LICENSE AND COPYRIGHT πΈ
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
- ubuntu resolute: libcsaf-perl 0.26-1 Β· Artistic-2.0
- ubuntu stonking: libcsaf-perl 0.26-1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms