CSAF::...Options(3pm)
π CSAF::...Options β the manual page, but make it cute π
okay bestie, so this is CSAF::Util::Options, and it lives in the User Contributed Perl Documentation section, subsection 3pm (that's Perl module docs, iykyk). no cap, it's shorter than you think but it's mighty. let's go π¦
β¨ NAME β¨
CSAF::Util::Options β the Options utility for CSAF. that's it, that's the whole name. iconic behaviour honestly π
πΈ SYNOPSIS πΈ
here's the whole vibe, copy-paste energy, don't touch a character:
package My::CSAF::Options {
use Moo;
with 'CSAF::Util::Options';
has enable_foo => (is => 'rw', required => 1);
has make_bar => (is => 'rw');
}
package My::CSAF {
use Moo;
use My::CSAF::Options;
has options => (is => 'lazy', build => 1);
sub _build_options { My::CSAF::Options->new }
sub my_job {
my $self = shift;
$self->options->configure(make_bar => $bar);
if ($self->options->enable_foo) {
[...]
}
}
}
see how you with 'CSAF::Util::Options' into your own package, declare your own has attributes, then from your main class you keep an options attribute (lazy, with a builder), build it with My::CSAF::Options->new, call configure(...) on it, and then read it back with $self->options->enable_foo? that's the whole loop, bestie, that's the plot π
π DESCRIPTION π
CSAF::Util::Options is a Moo role and utility for CSAF. so you're not subclassing some big heavy thing, you're wearing it. main character energy, but as a role π
π ATTRIBUTES π
config_fileβ loads config from a YAML file. so your settings can come from YAML, not just from you typing them in. slay π
π METHODS π
configureβ configures an item. here's how you call it:
$options->configure(
foo => 'foo',
bar => 'bar',
baz => 'baz'
);
it's giving "just pass me key-value pairs and I'll handle it". lowkey the most useful thing here and it's like five lines. obsessed π
π«Ά SUPPORT π«Ά
π Bugs / Feature Requests
found a bug? got a feature request that's been living in your head rent free? please report them through the issue tracker at <https://github.com/giterlizzi/perl-CSAF/issues>. and the best part: you will be notified automatically of any progress on your issue. no refreshing, no "did they see it", the tracker just tells you. periodt β¨
π¦ Source Code
this is open source software, bestie. the code repository is out there for public review and contribution, under the terms of the license. go look, go contribute, go be part of it:
<https://github.com/giterlizzi/perl-CSAF>
git clone https://github.com/giterlizzi/perl-CSAF.git
that's the whole clone command, character for character, go get it π§
π AUTHOR π
- Giuseppe Di Terlizzi <gdt@cpan.org>
thank you for your service, king π
π LICENSE AND COPYRIGHT π
this software is copyright (c) 2023-2025 by Giuseppe Di Terlizzi.
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 π
and that's the page, bestie π written against perl v5.40.1, dated 2025-09-03, served fresh from the User Contributed Perl Documentation section as CSAF::...Options(3pm). mwah, go configure something πβ¨
π¦ 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