Sah::S...lt_meta(3pm)
π Sah::Schema::rinci::result_meta π
okay bestie, so this is the manual page for Sah::Schema::rinci::result_meta β it's the Rinci envelope result metadata schema, no cap. (Yeah the title got squished to Sah::S...lt_meta in the header, the full name is the one up there β¬οΈ, we're keeping it real.)
β¨ VERSION β¨
This doc describes version 1.1.98.0 of Sah::Schema::rinci::result_meta, and it ships from the Perl distribution Sah-Schemas-Rinci, released on 2021-07-20. periodt.
π SYNOPSIS π
Wanna check some data against this schema? You're gonna need Data::Sah for that, bestie:
use Data::Sah qw(gen_validator);
my $validator = gen_validator("rinci::result_meta*");
say $validator->($data) ? "valid" : "INVALID!";
# Data::Sah can also create validator that returns nice error message string
# and/or coerced value. Data::Sah can even create validator that targets other
# language, like JavaScript. All from the same schema. See its documentation
# for more details.
Not me dropping the little comment block in there too, because it's part of the vibe and we do NOT skip details in this house π
Wanna validate your function parameters against this schema instead? That's a Params::Sah moment:
use Params::Sah qw(gen_validator);
sub myfunc {
my @args = @_;
state $validator = gen_validator("rinci::result_meta*");
$validator->(\@args);
...
}
And if you wanna specify the schema inside Rinci function metadata and then let Perinci::CmdLine cook up a whole CLI from it? Iconic behaviour honestly:
# in lib/MyApp.pm
package
MyApp;
our %SPEC;
$SPEC{myfunc} = {
v => 1.1,
summary => 'Routine to do blah ...',
args => {
arg1 => {
summary => 'The blah blah argument',
schema => ['rinci::result_meta*'],
},
...
},
};
sub myfunc {
my %args = @_;
...
}
1;
# in myapp.pl
package
main;
use Perinci::CmdLine::Any;
Perinci::CmdLine::Any->new(url=>'MyApp::myfunc')->run;
# in command-line
% ./myapp.pl --help
myapp - Routine to do blah ...
...
% ./myapp.pl --version
% ./myapp.pl --arg1 ...
(yes the weird package line breaks are intentional, that's literally how it's written, don't come for me π)
And here's some sample data so you can see what it's giving:
{} # valid
{stream=>1} # valid
Look at that. Two valid examples. She ate and left no crumbs π
π¦ HOMEPAGE π¦
Please visit the project's homepage at https://metacpan.org/release/Sah-Schemas-Rinci β go say hi, she's lovely.
π SOURCE π
Source repository is at https://github.com/perlancar/perl-Sah-Schemas-Rinci. go peek at the code, iykyk π
π BUGS π
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Sah-Schemas-Rinci.
okay real talk: when you submit a bug or a request, please include a test-file or a patch to an existing test-file that illustrates the bug or the feature you want. that's the whole assignment bestie, don't skip it π
π AUTHOR π
perlancar <perlancar@cpan.org> β shoutout, main character energy fr fr π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2021, 2020, 2019, 2018, 2016 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page, bestie!! π«Ά this was perl v5.36.0 flavoured, generated on 2022-11-19, and it's the Sah::S...lt_meta(3pm) manual β go forth and validate responsibly β¨πΈπ
π¦ where this page comes from
- debian bookworm: libsah-schemas-rinci-perl 1.1.98.0-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libsah-schemas-rinci-perl 1.1.98.0-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libsah-schemas-rinci-perl 1.1.98.0-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libsah-schemas-rinci-perl 1.1.98.0-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libsah-schemas-rinci-perl 1.1.98.0-2 Β· 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