Valida...adonly(3pm)
π Validation::Class::Directive::Readonly β the 3pm manual page, bestie edition π
Okay so real quick, before we even get into it: this is the manual page for Validation::Class::Directive::Readonly, and yes it lives in section 3pm of your man pages (that's the Perl module section, iykyk). Sit down, hydrate, let's go β¨
πΈ NAME πΈ
Validation::Class::Directive::Readonly β the Readonly Directive for Validation Class Field Definitions. That's the whole vibe. She's a directive, she handles "readonly", and she does it flawlessly π
π VERSION π
version 7.900059 β that's the one, don't @ me, that's literally what it says π
β¨ SYNOPSIS β¨
Here's the little demo, copied exactly so you can just paste it and go π«Ά
use Validation::Class::Simple;
my $rules = Validation::Class::Simple->new(
fields => {
task_completed => {
readonly => 1
}
}
);
# set parameters to be validated
$rules->params->add($parameters);
# validate
unless ($rules->validate) {
# handle the failures
}
So like β you spin up your Validation::Class::Simple object, you tell it about a field called task_completed, and you mark it readonly => 1. Then you load up your params, you call validate, and if it comes back false you go deal with the failures. That's the whole flow, no notes π
π¦ DESCRIPTION π¦
So Validation::Class::Directive::Readonly is a core validation class field directive. And what does a readonly directive actually do, you ask? The way that it determines whether the associated parameters should be ignored. That's it. That's her job. Iconic behaviour honestly π
π AUTHOR π
Al Newkirk <anewkirk@ana.io> β the legend who wrote her π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2011 by Al Newkirk.
This is 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 wild, but respectfully πΈ
Bestie note: the man page itself was rendered byperl v5.36.0, dated2023-06-11β that's your footer, that's your timestamp, and honestly? A little nostalgic, a little iconic πβ¨
mwah, go validate something π
π¦ where this page comes from
- debian trixie: libvalidation-class-perl 7.900059-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libvalidation-class-perl 7.900059-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libvalidation-class-perl 7.900059-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libvalidation-class-perl 7.900059-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