DBIx::...erifier(3pm)
π DBIx::...erifier(3pm) π
okay bestie, so this is a page from the User Contributed Perl Documentation, and it's about DBIx::Class::Helper::Schema::Verifier, which β the title got truncated to DBIx::...erifier(3pm) because apparently man pages fear commitment β but we know the full name, we're not scared. let's go π¦
β¨ NAME β¨
DBIx::Class::Helper::Schema::Verifier β Verify the Results and ResultSets of your Schemata
like, it checks your schema's stuff. all of it. your exacting standards? met. π
β¨ SYNOPSIS β¨
package MyApp::Schema;
__PACKAGE__->load_components('Helper::Schema::Verifier');
sub result_verifiers {
(
sub {
my ($self, $result, $set) = @_;
for ($result, $set) {
die "$_ does not start with the letter A" unless m/^A/
}
},
shift->next::method,
)
}
look at that. load the component, write a result_verifiers sub, and suddenly your schema has opinions. main character behaviour fr fr π
β¨ DESCRIPTION β¨
DBIx::Class::Helper::Schema::Verifier is a minuscule framework (her word, not mine, she's humble) that helps you build schemata that match your very own exacting specifications. it is inspired by the author's own travails in discovering that use mro 'c3' is both required and barely documented in much Perl code β like, the audacity π
as time goes by, the plan is to add many more verifiers, but with this inaugural release she is merely including DBIx::Class::Helper::Schema::Verifier::C3. starting small, staying iconic, we love a debut era πΈ
β¨ INTERFACE METHODS β¨
result_verifiers π
you must implement result_verifiers in your subclass of ::Verifier. no skipping, bestie, this is the whole assignment.
each verifier gets called on the schema, and gets each result and resultset together as arguments. you can use this to validate almost anything about the results and resultsets of a schema β literally almost anything, go feral π¦
and contributions are warmly welcomed. like, genuinely. she said warmly. that's an open invitation, iykyk π«Ά
β¨ MORE ERRORS β¨
ngl, initially this module kept things simple. but after using it in production at ZipRecruiter (https://www.ziprecruiter.com) she found that showing the user the first error that occurred and then just giving up was, and i quote the vibe, pretty annoying π
so now Schema::Verifier wraps both load_namespaces in DBIx::Class::Schema and load_classes in DBIx::Class::Schema, and shows all the exceptions encountered as a list at the end of loading all the results.
like, all of them. at once. a little error buffet. iconic, honestly π₯
β¨ AUTHOR β¨
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
(the legend herself β¨)
β¨ COPYRIGHT AND LICENSE β¨
This software is copyright (c) 2024 by Arthur Axel "fREW" Schmidt.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, legally speaking π
and that's the whole page, bestie β this doc came from perl v5.40.0, dated 2024-11-16, and it lives at DBIx::...erifier(3pm) in the User Contributed Perl Documentation. go forth and verify your schemata, you've got this πβπ
π¦ where this page comes from
- debian trixie: libdbix-class-helpers-perl 2.037000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdbix-class-helpers-perl 2.037000-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdbix-class-helpers-perl 2.037000-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