line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Log::Contextual::Easy::Package; |
2
|
|
|
|
|
|
|
$Log::Contextual::Easy::Package::VERSION = '0.008000'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Import all logging methods with WarnLogger as default package logger |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
682
|
use strict; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
34
|
|
6
|
1
|
|
|
1
|
|
8
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
37
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
8
|
use base 'Log::Contextual'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
269
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub arg_package_logger { |
11
|
1
|
50
|
|
1
|
0
|
7
|
if ($_[1]) { |
12
|
0
|
|
|
|
|
0
|
return $_[1]; |
13
|
|
|
|
|
|
|
} else { |
14
|
1
|
|
|
|
|
12
|
require Log::Contextual::WarnLogger; |
15
|
1
|
|
|
|
|
5
|
my $package = uc(caller(3)); |
16
|
1
|
|
|
|
|
7
|
$package =~ s/::/_/g; |
17
|
1
|
|
|
|
|
13
|
return Log::Contextual::WarnLogger->new({env_prefix => $package}); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
1
|
0
|
12
|
sub default_import { qw(:dlog :log ) } |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |