| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
########################################################################### |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# Silent.pm |
|
4
|
|
|
|
|
|
|
# |
|
5
|
|
|
|
|
|
|
# Copyright (C) 1999 Raphael Manfredi. |
|
6
|
|
|
|
|
|
|
# Copyright (C) 2002-2017 Mark Rogaski, mrogaski@cpan.org; |
|
7
|
|
|
|
|
|
|
# all rights reserved. |
|
8
|
|
|
|
|
|
|
# |
|
9
|
|
|
|
|
|
|
# See the README file included with the |
|
10
|
|
|
|
|
|
|
# distribution for license information. |
|
11
|
|
|
|
|
|
|
# |
|
12
|
|
|
|
|
|
|
########################################################################## |
|
13
|
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
1041
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
57
|
|
|
15
|
|
|
|
|
|
|
require Log::Agent::Driver; |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
######################################################################## |
|
18
|
|
|
|
|
|
|
package Log::Agent::Driver::Silent; |
|
19
|
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
5
|
use vars qw(@ISA); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
352
|
|
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
@ISA = qw(Log::Agent::Driver); |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# |
|
25
|
|
|
|
|
|
|
# ->make -- defined |
|
26
|
|
|
|
|
|
|
# |
|
27
|
|
|
|
|
|
|
# Creation routine. |
|
28
|
|
|
|
|
|
|
# |
|
29
|
|
|
|
|
|
|
sub make { |
|
30
|
1
|
|
|
1
|
1
|
271
|
my $self = bless {}, shift; |
|
31
|
1
|
|
|
|
|
4
|
return $self; |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# |
|
35
|
|
|
|
|
|
|
# NOP routines. |
|
36
|
|
|
|
|
|
|
# |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
0
|
1
|
|
sub prefix_msg {} |
|
39
|
|
|
|
0
|
1
|
|
sub emit {} |
|
40
|
0
|
|
|
0
|
1
|
0
|
sub channel_eq { 1 } |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# |
|
43
|
|
|
|
|
|
|
# In theory, we could live with the above NOP ops and the logxxx() |
|
44
|
|
|
|
|
|
|
# routines would not do anything. Let's redefine them though... |
|
45
|
|
|
|
|
|
|
# |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
0
|
1
|
|
sub logerr {} |
|
48
|
|
|
|
0
|
1
|
|
sub logwarn {} |
|
49
|
|
|
|
0
|
1
|
|
sub logcluck {} |
|
50
|
|
|
|
0
|
1
|
|
sub logsay {} |
|
51
|
|
|
|
0
|
0
|
|
sub loginfo {} |
|
52
|
|
|
|
0
|
0
|
|
sub logdebug {} |
|
53
|
|
|
|
0
|
1
|
|
sub logwrite {} |
|
54
|
|
|
|
1
|
1
|
|
sub logxcarp {} |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# |
|
57
|
|
|
|
|
|
|
# Those need minimal processing. |
|
58
|
|
|
|
|
|
|
# We explicitely stringify the string argument (uses overloaded "" method) |
|
59
|
|
|
|
|
|
|
# |
|
60
|
|
|
|
|
|
|
|
|
61
|
0
|
|
|
0
|
1
|
0
|
sub logconfess { require Carp; Carp::confess("$_[1]"); } |
|
|
0
|
|
|
|
|
0
|
|
|
62
|
0
|
|
|
0
|
1
|
0
|
sub logdie { die "$_[0]\n"; } |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
# |
|
65
|
|
|
|
|
|
|
# ->logxcroak -- redefined |
|
66
|
|
|
|
|
|
|
# |
|
67
|
|
|
|
|
|
|
# Handle the offset parameter correctly |
|
68
|
|
|
|
|
|
|
# |
|
69
|
|
|
|
|
|
|
sub logxcroak { |
|
70
|
1
|
|
|
1
|
1
|
3
|
my $self = shift; |
|
71
|
1
|
|
|
|
|
2
|
my ($offset, $str) = @_; |
|
72
|
1
|
|
|
|
|
6
|
require Carp; |
|
73
|
1
|
|
|
|
|
7
|
my $msg = $self->carpmess($offset, $str, \&Carp::shortmess); |
|
74
|
1
|
|
|
|
|
5
|
die "$msg\n"; |
|
75
|
|
|
|
|
|
|
} |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
1; # for require |
|
78
|
|
|
|
|
|
|
__END__ |