Perl Diver 2.33
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Log::Any::Adapter::Util

Name Log::Any::Adapter::Util
Version 1.710
Located at /usr/share/perl5
File /usr/share/perl5/Log/Any/Adapter/Util.pm
Is Core No
Search CPAN for this module Log::Any::Adapter::Util
Documentation Log::Any::Adapter::Util
Module Details Log::Any::Adapter::Util


NAME

Log::Any::Adapter::Util - Common utility functions for Log::Any


VERSION

version 1.710


DESCRIPTION

This module has utility functions to help develop the Log::Any::Adapter manpage subclasses or the Log::Any::Proxy manpage formatters/filters. It also has some functions used in internal testing.


SUBROUTINES

logging_methods

Returns a list of all logging method. E.g. ``trace'', ``info'', etc.

detection_methods

Returns a list of detection methods. E.g. ``is_trace'', ``is_info'', etc.

logging_and_detection_methods

Returns a list of logging and detection methods (but not aliases).

log_level_aliases

Returns key/value pairs mapping aliases to ``official'' names. E.g. ``err'' maps to ``error''.

logging_aliases

Returns a list of logging alias names. These are the keys from log_level_aliases.

detection_aliases

Returns a list of detection aliases. E.g. ``is_err'', ``is_fatal'', etc.

numeric_level

Given a level name (or alias), returns the numeric value described above under log level constants. E.g. ``err'' would return 3.

dump_one_line

Given a reference, returns a one-line the Data::Dumper manpage dump with keys sorted.

make_method

Given a method name, a code reference and a package name, installs the code reference as a method in the package.

require_dynamic (DEPRECATED)

Given a class name, attempts to load it via require unless the class already has a constructor available. Throws an error on failure. Used internally and may become private in the future.

read_file (DEPRECATED)

Slurp a file. Does *not* apply any layers. Used for testing and may become private in the future.

cmp_deeply (DEPRECATED)

Compares the dump_one_line manpage results for two references. Also takes a test label as a third argument. Used for testing and may become private in the future.


USAGE

Nothing is exported by default.

Log level constants

If the :levels tag is included in the import list, the following numeric constants will be imported:

    EMERGENCY => 0
    ALERT     => 1
    CRITICAL  => 2
    ERROR     => 3
    WARNING   => 4
    NOTICE    => 5
    INFO      => 6
    DEBUG     => 7
    TRACE     => 8


AUTHORS


COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Jonathan Swartz, David Golden, and Doug Bell.

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

Perl Diver brought to you by ScriptSolutions.com © 1997- 2026