line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Log::Mini; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
189359
|
use strict; |
|
3
|
|
|
|
|
24
|
|
|
3
|
|
|
|
|
80
|
|
4
|
3
|
|
|
3
|
|
13
|
use warnings; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
459
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = "0.2.1"; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
6
|
|
|
6
|
0
|
13033
|
shift; |
10
|
6
|
|
|
|
|
15
|
my ( $type, @args ) = @_; |
11
|
|
|
|
|
|
|
|
12
|
6
|
50
|
|
|
|
18
|
$type = 'stderr' unless defined $type; |
13
|
|
|
|
|
|
|
|
14
|
6
|
100
|
|
|
|
21
|
if ( $type eq 'file' ) { |
|
|
100
|
|
|
|
|
|
15
|
2
|
|
|
|
|
720
|
require Log::Mini::LoggerFILE; |
16
|
2
|
|
|
|
|
14
|
return Log::Mini::LoggerFILE->new(@_); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
elsif ( $type eq 'null' ) { |
19
|
1
|
|
|
|
|
402
|
require Log::Mini::LoggerNULL; |
20
|
1
|
|
|
|
|
8
|
return Log::Mini::LoggerNULL->new(@args); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
else { |
23
|
3
|
|
|
|
|
764
|
require Log::Mini::LoggerSTDERR; |
24
|
3
|
|
|
|
|
22
|
return Log::Mini::LoggerSTDERR->new(@args); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
__END__ |