line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Log::NullLogLite; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1030
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
36
|
|
4
|
1
|
|
|
1
|
|
5
|
use vars qw($VERSION @ISA); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
134
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
$VERSION = 0.82; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# According to the Null pattern. |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
# Log::NullLogLite inherits from Log::LogLite and implement the Null |
11
|
|
|
|
|
|
|
# Object Pattern. |
12
|
1
|
|
|
1
|
|
5
|
use Log::LogLite; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
13
|
|
|
|
|
|
|
@ISA = ("Log::LogLite"); |
14
|
|
|
|
|
|
|
package Log::NullLogLite; |
15
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
405
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
########################################## |
18
|
|
|
|
|
|
|
# new($filepath) |
19
|
|
|
|
|
|
|
# new($filepath,$level) |
20
|
|
|
|
|
|
|
# new($filepath,$level,$default_message) |
21
|
|
|
|
|
|
|
########################################## |
22
|
|
|
|
|
|
|
# the constructor |
23
|
|
|
|
|
|
|
sub new { |
24
|
1
|
|
|
1
|
1
|
233
|
my $proto = shift; # get the class name |
25
|
1
|
|
33
|
|
|
10
|
my $class = ref($proto) || $proto; |
26
|
1
|
|
|
|
|
3
|
my $self = {}; |
27
|
1
|
|
|
|
|
3
|
bless ($self, $class); |
28
|
1
|
|
|
|
|
3
|
return $self; |
29
|
|
|
|
|
|
|
} # of new |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
######################## |
32
|
|
|
|
|
|
|
# write($message, $level) |
33
|
|
|
|
|
|
|
######################## |
34
|
|
|
|
|
|
|
# will log the message in the log file only if $level>=LEVEL |
35
|
|
|
|
|
|
|
sub write { |
36
|
1
|
|
|
1
|
1
|
6
|
my $self = shift; |
37
|
|
|
|
|
|
|
} # of write |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
########################## |
40
|
|
|
|
|
|
|
# level() |
41
|
|
|
|
|
|
|
# level($level) |
42
|
|
|
|
|
|
|
########################## |
43
|
|
|
|
|
|
|
# an interface to LEVEL |
44
|
|
|
|
|
|
|
sub level { |
45
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
46
|
0
|
|
|
|
|
|
return -1; |
47
|
|
|
|
|
|
|
} # of level |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
########################### |
50
|
|
|
|
|
|
|
# default_message() |
51
|
|
|
|
|
|
|
# default_message($message) |
52
|
|
|
|
|
|
|
########################### |
53
|
|
|
|
|
|
|
# an interface to DEFAULT_MESSAGE |
54
|
|
|
|
|
|
|
sub default_message { |
55
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
56
|
0
|
|
|
|
|
|
return ""; |
57
|
|
|
|
|
|
|
} # of default_message |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
60
|
|
|
|
|
|
|
__END__ |