- Name: perl-Log-Any-IfLOG
- Version: 0.90.0
- Release: 2.mga8
- Epoch:
- Group: Development/Perl
- License: GPL+ or Artistic
- Url: http://search.cpan.org/dist/Log-Any-IfLOG
- Summary: Load Log::Any only if "logging is enabled"
- Architecture: noarch
- Size: 18809
- Distribution: Mageia
- Vendor: Mageia.Org
- Packager: umeabot <umeabot>
Description:
This module is a drop-in replacement/wrapper for Log::Any to be used
from your modules. This is a quick-hack solution to avoid the cost of
loading Log::Any under "normal condition". Since Log::Any 1.00, startup
overhead increases to about 7-10ms on my PC/laptop (from under 1ms for
the previous version). Because I want to keep startup overhead of CLI
apps under 50ms (see Perinci::CmdLine::Lite) to keep tab completion
from getting a noticeable lag, every millisecond counts.
This module will only load Log::Any when "logging is enabled".
Otherwise, it will just return without loading anything. If $log is
requested in import, a fake object is returned that responds to methods
like debug, is_debug and so on but will do nothing when called and just
return 0.
To determine "logging is enabled":
* Is $ENABLE_LOG defined?
This package variable can be used to force "logging enabled" (if
true) or "logging disabled" (if false). Normally, you don't need to
do this except for testing.
* Is Log::Any is already loaded (from %INC)?
If Log::Any is already loaded, it means we have taken the overhead
hit anyway so logging is enabled.
* Is one of log-related environment variables true?
If one of LOG, TRACE, or DEBUG, or VERBOSE, or QUIET, or LOG_LEVEL is
true then logging is enabled. These variables are used by
Perinci::CmdLine.
Otherwise, logging is disabled.
- BuildArch:
- ExcludeArch:
- ExclusiveArch:
- Cookie: localhost 1581711339
- Buildhost: localhost
Generated packages:
Other version of this rpm: