Log::Di...ch::Code(3)
π Log::Dispatch::Code β the Perl manpage, but make it cute β¨
okay bestie, so this is a page from the User Contributed Perl Documentation section (perl v5.42.0, if you're keeping score π), and it's literally all about Log::Dispatch::Code β an object for logging to a subroutine reference. iykyk π
β¨ NAME β¨
Log::Dispatch::Code β Object for logging to a subroutine reference π«Ά
πΈ VERSION πΈ
version 2.71 β yes ma'am, we're on 2.71 β
π¦ SYNOPSIS π¦
okay so here's the whole vibe in code form, copy it exactly bestie:
use Log::Dispatch;
my $log = Log::Dispatch->new(
outputs => [
[
'Code',
min_level => 'emerg',
code => \&_log_it,
],
]
);
sub _log_it {
my %p = @_;
warn $p{message};
}
like... the way that just works ππ
π DESCRIPTION π
This module supplies a simple object for logging to a subroutine reference. that's it, that's the whole personality β simple, focused, iconic. no cap π
π CONSTRUCTOR π
The constructor takes the following parameters in addition to the standard parameters documented in Log::Dispatch::Output β so don't come for it about the standard stuff, go read that page, bestie π
code ($)β The subroutine reference. that's your little function, your main character, the one doing the actual logging π§
π₯ HOW IT WORKS π₯
The subroutine you provide will be called with a hash of named arguments. yep, a hash. named args. we love a well-labeled data structure β¨
The two arguments are:
levelβ The log level of the message. This will be a string like"info"or"error". literally just a string, nothing spooky πmessageβ The message being logged. the actual content, the star of the show π
π SUPPORT π
Bugs may be submitted at <https://github.com/houseabsolute/Log-Dispatch/issues>. β please do report them, we're not monsters π
π§ SOURCE π§
The source code repository for Log-Dispatch can be found at <https://github.com/houseabsolute/Log-Dispatch>. β go look, it's giving open source excellence π¦
π AUTHOR π
Dave Rolsky <autarch@urth.org> β legend behaviour, we stan π«Ά
π COPYRIGHT AND LICENSE π
This software is Copyright (c) 2023 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
The full text of the license can be found in the LICENSE file included with this distribution. read it, bestie, it's important π
fr fr that's the whole page β every flag, every arg, every link, nothing skipped, periodt π β¨
and that's a wrap on the Log::Dispatch::Code page, served up by perl v5.42.0 on 2023-04-21 from the User Contributed Perl Documentation β mwah, hope that slayed for you πππ
π¦ where this page comes from
- opensuse-leap 16.0: perl-Log-Dispatch 2.71-bp160.1.2 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms