line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Alien::Build::Log; |
2
|
|
|
|
|
|
|
|
3
|
52
|
|
|
52
|
|
1890
|
use strict; |
|
52
|
|
|
|
|
124
|
|
|
52
|
|
|
|
|
1839
|
|
4
|
52
|
|
|
52
|
|
293
|
use warnings; |
|
52
|
|
|
|
|
132
|
|
|
52
|
|
|
|
|
1514
|
|
5
|
52
|
|
|
52
|
|
981
|
use 5.008004; |
|
52
|
|
|
|
|
200
|
|
6
|
52
|
|
|
52
|
|
327
|
use Carp (); |
|
52
|
|
|
|
|
131
|
|
|
52
|
|
|
|
|
16076
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# ABSTRACT: Alien::Build logging |
9
|
|
|
|
|
|
|
our $VERSION = '2.46'; # VERSION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $log_class; |
13
|
|
|
|
|
|
|
my $self; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new |
16
|
|
|
|
|
|
|
{ |
17
|
414
|
|
|
414
|
1
|
7397
|
my($class) = @_; |
18
|
414
|
100
|
|
|
|
1226
|
Carp::croak("Cannot instantiate base class") if $class eq 'Alien::Build::Log'; |
19
|
413
|
|
|
|
|
1820
|
return bless {}, $class; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub default |
24
|
|
|
|
|
|
|
{ |
25
|
414
|
50
|
|
414
|
1
|
2333
|
$self || do { |
26
|
414
|
|
100
|
|
|
2524
|
my $class = $log_class || $ENV{ALIEN_BUILD_LOG} || 'Alien::Build::Log::Default'; |
27
|
414
|
100
|
|
|
|
774
|
unless(eval { $class->can('new') }) |
|
414
|
|
|
|
|
3053
|
|
28
|
|
|
|
|
|
|
{ |
29
|
31
|
|
|
|
|
197
|
my $pm = "$class.pm"; |
30
|
31
|
|
|
|
|
234
|
$pm =~ s/::/\//g; |
31
|
31
|
|
|
|
|
15610
|
require $pm; |
32
|
|
|
|
|
|
|
} |
33
|
413
|
|
|
|
|
1438
|
$class->new; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub set_log_class |
39
|
|
|
|
|
|
|
{ |
40
|
3
|
|
|
3
|
1
|
6342
|
my(undef, $class) = @_; |
41
|
3
|
50
|
100
|
|
|
24
|
return if defined $class && ($class eq ($log_class || '')); |
|
|
|
66
|
|
|
|
|
42
|
3
|
|
|
|
|
5
|
$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__ |