/usr/share/perl5/Log/Any/Adapter/Null.pm is in liblog-any-perl 0.11-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | package Log::Any::Adapter::Null;
use Log::Any;
use strict;
use warnings;
sub new {
my $class = shift;
return bless {}, $class;
}
# Collect all logging and detection methods, including aliases and printf variants
#
my %aliases = Log::Any->log_level_aliases;
my @alias_names = keys(%aliases);
my @all_methods = (
Log::Any->logging_and_detection_methods(),
@alias_names,
( map { "is_$_" } @alias_names ),
( map { $_ . "f" } ( Log::Any->logging_methods, @alias_names ) ),
);
# All methods are no-ops
#
foreach my $method (@all_methods) {
no strict 'refs';
*{ __PACKAGE__ . "::$method" } = sub { };
}
1;
__END__
=pod
=head1 NAME
Log::Any::Adapter::Null
=head1 SYNOPSIS
Log::Any::Adapter->set('Null');
=head1 DESCRIPTION
This Log::Any adapter discards all log messages and returns false for all
detection methods (e.g. is_debug). This is the default adapter when Log::Any is
loaded.
=head1 SEE ALSO
L<Log::Any|Log::Any>, L<Log::Any::Adapter|Log::Any::Adapter>
=head1 AUTHOR
Jonathan Swartz
=head1 COPYRIGHT & LICENSE
Copyright (C) 2009 Jonathan Swartz, all rights reserved.
This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
=cut
|