Sah::S...::meta(3pm)
β¨ NAME β¨
Sah::Schema::rinci::meta β it's giving Rinci metadata π
that's literally the whole vibe, bestie.
πΈ VERSION πΈ
okay so this doc is describing version 1.1.98.0 of Sah::Schema::rinci::meta (she comes from the Perl distribution Sah-Schemas-Rinci), and she was released on 2021-07-20. iconic behavior, no cap π
π¦ SYNOPSIS π¦
So like, there's a few ways you can pull up on this schema depending on what you're trying to do, and I'm gonna walk you through all of them π«Ά
Wanna check data against this schema? (needs Data::Sah)
use Data::Sah qw(gen_validator);
my $validator = gen_validator("rinci::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.
the range!!! β one schema, so many outputs, we love a versatile queen π
Wanna validate function params against this schema? (needs Params::Sah)
use Params::Sah qw(gen_validator);
sub myfunc {
my @args = @_;
state $validator = gen_validator("rinci::meta*");
$validator->(\@args);
...
}
Wanna specify the schema in Rinci function metadata and then let Perinci::CmdLine build you a whole CLI out of it? say less π
# 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::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 ...
a whole CLI from metadata?? she ate and left no crumbs fr fr π₯
Sample data, so you know what passes the vibe check π
{} # valid
{summary=>"Some summary"} # valid
π HOMEPAGE π
bestie pls come visit the project's homepage, it's right here:
https://metacpan.org/release/Sah-Schemas-Rinci
π SOURCE π
the source repo lives at:
https://github.com/perlancar/perl-Sah-Schemas-Rinci
π BUGS π
found a bug? want a feature? please drop it on the bugtracker, she reads them:
https://rt.cpan.org/Public/Dist/Display.html?Name=Sah-Schemas-Rinci
okay this part is important so listen up π β when you submit a bug or a request, please include a test-file or a patch to an existing test-file that shows the bug or the thing you want. it makes everything so much easier, tysm π«Ά
π AUTHOR π
perlancar</purl> <perlancar@cpan.org> β the main character, periodt π
π 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, dated 2022-11-19, and we were reading the manual page for Sah::S...::meta(3pm). mwah, go write something iconic πππ«Ά
π¦ 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