line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
# Base class for Chronic. |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Schedule::Chronic::Base; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub debug { |
8
|
|
|
|
|
|
|
|
9
|
0
|
|
|
0
|
0
|
|
my ($self, $msg) = @_; |
10
|
0
|
|
|
|
|
|
my ($package, $filename, $line, $sub, @foo) = caller(1); |
11
|
0
|
|
|
|
|
|
$sub =~ s/Schedule::Chronic:://; |
12
|
0
|
|
|
|
|
|
$self->{logger}->logthis("$msg"); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub fatal { |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
0
|
0
|
|
my ($self, $msg) = @_; |
20
|
0
|
|
|
|
|
|
print STDOUT "FATAL ERROR: $msg\n"; |
21
|
0
|
|
|
|
|
|
die("\n"); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub which { |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
0
|
|
my ($self, $app) = @_; |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
my $path = `which $app`; |
31
|
0
|
|
|
|
|
|
chomp $path; |
32
|
|
|
|
|
|
|
|
33
|
0
|
0
|
|
|
|
|
if ($path =~ /no $app/) { |
34
|
0
|
|
|
|
|
|
return; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
return $path; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|