File Coverage

blib/lib/Log/Dispatch/Null.pm
Criterion Covered Total %
statement 13 13 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 18 20 90.0


line stmt bran cond sub pod time code
1             package Log::Dispatch::Null;
2              
3 3     3   2053 use strict;
  3         7  
  3         89  
4 3     3   16 use warnings;
  3         11  
  3         141  
5              
6             our $VERSION = '2.71';
7              
8 3     3   17 use base qw( Log::Dispatch::Output );
  3         9  
  3         467  
9              
10             sub new {
11 7     7 0 3438 my $class = shift;
12              
13 7         19 my $self = bless {}, $class;
14 7         48 $self->_basic_init(@_);
15              
16 7         43 return $self;
17             }
18              
19       5 0   sub log_message { }
20              
21             1;
22              
23             # ABSTRACT: Object that accepts messages and does nothing
24              
25             __END__
26              
27             =pod
28              
29             =encoding UTF-8
30              
31             =head1 NAME
32              
33             Log::Dispatch::Null - Object that accepts messages and does nothing
34              
35             =head1 VERSION
36              
37             version 2.71
38              
39             =head1 SYNOPSIS
40              
41             use Log::Dispatch;
42              
43             my $null
44             = Log::Dispatch->new( outputs => [ [ 'Null', min_level => 'debug' ] ] );
45              
46             $null->emerg( "I've fallen and I can't get up" );
47              
48             =head1 DESCRIPTION
49              
50             This class provides a null logging object. Messages can be sent to the object
51             but it does nothing with them.
52              
53             =for Pod::Coverage new log_message
54              
55             =head1 SUPPORT
56              
57             Bugs may be submitted at L<https://github.com/houseabsolute/Log-Dispatch/issues>.
58              
59             =head1 SOURCE
60              
61             The source code repository for Log-Dispatch can be found at L<https://github.com/houseabsolute/Log-Dispatch>.
62              
63             =head1 AUTHOR
64              
65             Dave Rolsky <autarch@urth.org>
66              
67             =head1 COPYRIGHT AND LICENSE
68              
69             This software is Copyright (c) 2023 by Dave Rolsky.
70              
71             This is free software, licensed under:
72              
73             The Artistic License 2.0 (GPL Compatible)
74              
75             The full text of the license can be found in the
76             F<LICENSE> file included with this distribution.
77              
78             =cut