line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Alien::Build::Log; |
2
|
|
|
|
|
|
|
|
3
|
52
|
|
|
52
|
|
1518
|
use strict; |
|
52
|
|
|
|
|
105
|
|
|
52
|
|
|
|
|
1452
|
|
4
|
52
|
|
|
52
|
|
245
|
use warnings; |
|
52
|
|
|
|
|
127
|
|
|
52
|
|
|
|
|
1256
|
|
5
|
52
|
|
|
52
|
|
838
|
use 5.008004; |
|
52
|
|
|
|
|
168
|
|
6
|
52
|
|
|
52
|
|
255
|
use Carp (); |
|
52
|
|
|
|
|
106
|
|
|
52
|
|
|
|
|
13170
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# ABSTRACT: Alien::Build logging |
9
|
|
|
|
|
|
|
our $VERSION = '2.47'; # VERSION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $log_class; |
13
|
|
|
|
|
|
|
my $self; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new |
16
|
|
|
|
|
|
|
{ |
17
|
414
|
|
|
414
|
1
|
6163
|
my($class) = @_; |
18
|
414
|
100
|
|
|
|
1141
|
Carp::croak("Cannot instantiate base class") if $class eq 'Alien::Build::Log'; |
19
|
413
|
|
|
|
|
1556
|
return bless {}, $class; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub default |
24
|
|
|
|
|
|
|
{ |
25
|
414
|
50
|
|
414
|
1
|
2017
|
$self || do { |
26
|
414
|
|
100
|
|
|
2219
|
my $class = $log_class || $ENV{ALIEN_BUILD_LOG} || 'Alien::Build::Log::Default'; |
27
|
414
|
100
|
|
|
|
652
|
unless(eval { $class->can('new') }) |
|
414
|
|
|
|
|
2738
|
|
28
|
|
|
|
|
|
|
{ |
29
|
31
|
|
|
|
|
105
|
my $pm = "$class.pm"; |
30
|
31
|
|
|
|
|
195
|
$pm =~ s/::/\//g; |
31
|
31
|
|
|
|
|
13413
|
require $pm; |
32
|
|
|
|
|
|
|
} |
33
|
413
|
|
|
|
|
1214
|
$class->new; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub set_log_class |
39
|
|
|
|
|
|
|
{ |
40
|
3
|
|
|
3
|
1
|
5326
|
my(undef, $class) = @_; |
41
|
3
|
50
|
100
|
|
|
17
|
return if defined $class && ($class eq ($log_class || '')); |
|
|
|
66
|
|
|
|
|
42
|
3
|
|
|
|
|
4
|
$log_class = $class; |
43
|
3
|
|
|
|
|
7
|
undef $self; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub log |
48
|
|
|
|
|
|
|
{ |
49
|
0
|
|
|
0
|
1
|
|
Carp::croak("AB Log base class"); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |