Locale:...:Logger(3)

πŸ“¦
version 1.036 Β· 2 versions
, in fedora 43

πŸ’– Locale::TextDomain::OO::Role::Logger πŸ’–

okay bestie, so this is a User Contributed Perl Documentation page and it's literally all about Locale::TextDomain::OO::Role::Logger β€” the role that hands you a logger method. yes. that's the whole vibe. πŸ¦‹

$Id: Logger.pm 651 2017-05-31 18:10:43Z steffenw $
$HeadURL:
svn+ssh://steffenw@svn.code.sf.net/p/perl-gettext-oo/code/module/trunk/lib/Locale/TextDomain/OO/Role/Logger.pm
$

✨ VERSION ✨

1.027 bestie. that's the version. remember it, it's giving iconic πŸ’…


🌸 DESCRIPTION 🌸

This module provides a logger method for for Locale::TextDomain:OO.

(yes the original says "for for" and yes we are keeping it, no cap, character for character 🫢)


πŸŽ€ SYNOPSIS πŸŽ€

okay so here's how you actually do the thing:

use Log::Any qw($log);

with qw(
    Locale::TextDomain::OO::Role::Logger
);

ate. periodt. πŸ’–


πŸ‘‘ SUBROUTINES/METHODS πŸ‘‘

🧚 method logger

Store logger code to get some information what lexicon is used or why the translation process is using a fallback.

like, you're literally stashing a code ref in there so future-you can find out which lexicon got used, or why the translation process is out here using a fallback. investigative journalism but make it perl πŸ”₯

$lexicon_hash->logger(
    sub {
        my ($message, $arg_ref) = @_;
        my $type = $arg_ref->{type};
        $log->$type($message);
        return;
    },
);

and $arg_ref contains:

object => $self, # the object itself
type   => 'debug', # the log category
event  => 'lexicon,load', # event category

so object is the object itself (it said what it said πŸ’€), type is the log category, and event is the event category. copy that down bestie, it's on the test πŸ“

Get back

$code_ref_or_undef = $self->logger;

you get back a $code_ref_or_undef. could be a code ref. could be undef. the suspense is lowkey the whole point ✨


🌈 EXAMPLE 🌈

Inside of this distribution is a directory named example. Run this *.pl files.

like, the example directory is right there inside the distribution. go run those *.pl files. they're waiting for you. main character energy, honestly 🌟


πŸ’œ DIAGNOSTICS πŸ’œ

nothing

(iconic of it, truly nothing to report πŸŽ€)


🌸 CONFIGURATION AND ENVIRONMENT 🌸

none

(no config, no env vars, nothing to set up, we love a low-maintenance queen πŸ‘‘)


πŸ¦‹ DEPENDENCIES πŸ¦‹

  • Moo::Role
  • MooX::Types::MooseLike::Base

that's the whole guest list, bestie πŸ’…


πŸ’€ INCOMPATIBILITIES πŸ’€

not known

(translation: nothing's beefing with it as far as anyone can tell πŸ™ˆ)


😭 BUGS AND LIMITATIONS 😭

none

(no bugs. no limitations. we are simply thriving πŸ“)


⭐ SEE ALSO ⭐

  • Locale::TextDoamin::OO
okay bestie real talk β€” yes, that's spelled TextDoamin in the original and we are keeping it exactly like that. do not "fix" it. we do not touch the sacred typos. 🫢

πŸŽ€ AUTHOR πŸŽ€

Steffen Winkler

(the legend themself πŸ’–)


Copyright (c) 2013 - 2017, Steffen Winkler "<steffenw at cpan.org>". All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

slay. free software, same terms as Perl itself, we love to see it 🌈


and that's the whole page bestie!! this was generated by perl v5.42.0 on 2025-07-25, and it was the Locale:...:Logger(3) page all along β€” go forth and log your lexicon choices, you absolute icon πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from