/usr/share/perl5/Log/Any/Adapter/Test/Memory.pm is in liblog-any-adapter-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 | package Log::Any::Adapter::Test::Memory;
{
$Log::Any::Adapter::Test::Memory::VERSION = '0.11';
}
use Log::Any::Adapter::Util qw(make_method);
use strict;
use warnings;
use base qw(Log::Any::Adapter::Base);
sub init {
my ($self) = @_;
$self->{msgs} = [];
}
foreach my $method ( Log::Any->logging_methods() ) {
make_method(
$method,
sub {
my ( $self, $text ) = @_;
push(
@{ $self->{msgs} },
{
level => $method,
category => $self->{category},
text => $text
}
);
}
);
}
foreach my $method ( Log::Any->detection_methods() ) {
make_method( $method, sub { my ( $self, $msg ) = @_; return 1 } );
}
1;
|