Locale::TextDomain::OO::Role::Logger - Provides a logger method
$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 $
1.027
This module provides a logger method for for Locale::TextDomain:OO.
use Log::Any qw($log); with qw( Locale::TextDomain::OO::Role::Logger );
Store logger code to get some information what lexicon is used or why the translation process is using a fallback.
$lexicon_hash->logger( sub { my ($message, $arg_ref) = @_; my $type = $arg_ref->{type}; $log->$type($message); return; }, );
$arg_ref contains
object => $self, # the object itself type => 'debug', # the log category event => 'lexicon,load', # event category
Get back
$code_ref_or_undef = $self->logger;
Inside of this distribution is a directory named example. Run this *.pl files.
nothing
none
Moo::Role
MooX::Types::MooseLike::Base
not known
Locale::TextDoamin::OO
Steffen Winkler
Copyright (c) 2013 - 2017, Steffen Winkler <steffenw at cpan.org>. All rights reserved.
<steffenw at cpan.org>
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Locale::TextDomain::OO, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Locale::TextDomain::OO
CPAN shell
perl -MCPAN -e shell install Locale::TextDomain::OO
For more information on module installation, please visit the detailed CPAN module installation guide.