NAME
Require::HookChain::log::logger - Log a message to Log::ger
VERSION
This document describes version 0.016 of Require::HookChain::log::logger (from Perl distribution Require-HookChain), released on 2023-12-05.
SYNOPSIS
use Require::HookChain 'log::ger';
# now each time we require(), a logging statement is produced at the trace level
A demo (nauniq is a Perl script you can get from CPAN, and Log::ger::Screen is a module to show log statements on the terminal. Note that the loading of strict.pm and warnings.pm are not logged because they are already loaded by Log::ger::Screen
. If you want logging of such modules you can try Require::HookChain::log::stderr which avoids the use of any module itself.
$ TRACE=1 PERL5OPT="-MLog::ger::Screen -MRequire::HookChain=log::logger" nauniq ~/samples/1.csv
Require::HookChain::log::logger: Require-ing App/nauniq.pm (called from package main file /home/u1/perl5/perlbrew/perls/perl-5.34.0/bin/nauniq:7) ...
Require::HookChain::log::logger: Require-ing Getopt/Long.pm (called from package main file /home/u1/perl5/perlbrew/perls/perl-5.34.0/bin/nauniq:8) ...
Require::HookChain::log::logger: Require-ing vars.pm (called from package Getopt::Long file /loader/0x56139558fdb0/Getopt/Long.pm:20) ...
Require::HookChain::log::logger: Require-ing warnings/register.pm (called from package vars file /loader/0x56139558fdb0/vars.pm:7) ...
Require::HookChain::log::logger: Require-ing constant.pm (called from package Getopt::Long file /loader/0x56139558fdb0/Getopt/Long.pm:220) ...
Require::HookChain::log::logger: Require-ing overload.pm (called from package Getopt::Long::CallBack file /loader/0x56139558fdb0/Getopt/Long.pm:1574) ...
Require::HookChain::log::logger: Require-ing overloading.pm (called from package overload file /loader/0x56139558fdb0/overload.pm:84) ...
Require::HookChain::log::logger: Require-ing Exporter/Heavy.pm (called from package Exporter file /home/u1/perl5/perlbrew/perls/perl-5.34.0/lib/5.34.0/Exporter.pm:13) ...
...
DESCRIPTION
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/Require-HookChain.
SOURCE
Source repository is at https://github.com/perlancar/perl-Require-HookChain.
SEE ALSO
Require::HookChain::log::stderr
AUTHOR
perlancar <perlancar@cpan.org>
CONTRIBUTING
To contribute, you can send patches by email/via RT, or send pull requests on GitHub.
Most of the time, you don't need to build the distribution yourself. You can simply modify the code, then test via:
% prove -l
If you want to build the distribution (e.g. to try to install it locally on your system), you can install Dist::Zilla, Dist::Zilla::PluginBundle::Author::PERLANCAR, Pod::Weaver::PluginBundle::Author::PERLANCAR, and sometimes one or two other Dist::Zilla- and/or Pod::Weaver plugins. Any additional steps required beyond that are considered a bug and can be reported to me.
COPYRIGHT AND LICENSE
This software is copyright (c) 2023, 2022, 2020, 2017 by perlancar <perlancar@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Require-HookChain
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.