Log::H...::YAML(3pm)
π Log::H...::YAML β aka Log::Handler::Plugin::YAML(3pm) π
okay bestie, sit down, hydrate, and let me tell you about the cutest little YAML config loader in the Perl ecosystem. This is Log::Handler::Plugin::YAML, and its whole personality is: "you give me a YAML file, I give you a config ref." That's it. That's the vibe. It's a config loader for YAML, periodt. β¨
πΈ NAME πΈ
Log::Handler::Plugin::YAML β a config loader for YAML. it loads configs. from YAML. she's simple, she's focused, she minds her own business. π
π¦ SYNOPSIS π¦
the way you use this is literally two lines, no notes:
use Log::Handler::Plugin::YAML;
my $config = Log::Handler::Plugin::YAML->get_config( $config_file );
see? iconic. you use it, then you call get_config on the class and hand it a $config_file. done. π
π ROUTINES π
β¨ get_config() β¨
she expects the config file name, and she hands you back the config as a reference. that's the whole deal, fr fr. one arg in, one ref out. π«Ά
π CONFIG STYLE π
here's what a config can look like, and no I did not make this up, this is canon:
---
file:
mylog:
debug_mode: 2
filename: example.log
fileopen: 1
maxlevel: info
minlevel: warn
mode: append
newline: 1
permissions: 0640
message_layout: %T %H[%P] [%L] %S: %m
reopen: 1
timeformat: %b %d %H:%M:%S
look at her. nesting so clean, so structured, so main character. π§
π PREREQUISITES π
YAMLβ yeah bestie, you gotta have it. no YAML module, no YAML parsing. that's just the rules. π
π EXPORTS π
No exports.
nope! nothing! she exports nothing! your namespace stays untouched, your vibes stay pristine. π
π REPORT BUGS π
Please report all bugs to <jschulz.cpan(at)bloonix.de>.
and if you send me a mail then add Log::Handler into the subject β no cap, this is important, do not skip the subject line, the author is literally asking nicely. π§
π AUTHOR π
Jonny Schulz <jschulz.cpan(at)bloonix.de>.
β COPYRIGHT β
Copyright (C) 2007-2009 by Jonny Schulz. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
lowkey a whole legal moment but make it slay. free software, same terms as Perl, we love to see it. π«Ά
and that's the page, bestie! this was Log::H...::YAML(3pm) from perl v5.36.0, dated 2022-08-28 β go load some YAML configs and be the main character of your own log files. mwah. ππΈβ¨
π¦ where this page comes from
- ubuntu noble: liblog-handler-perl 0.90-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: liblog-handler-perl 0.90-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: liblog-handler-perl 0.90-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