| 1 | |||||||||||
| 2 | # Base class for Chronic. | ||||||||||
| 3 | |||||||||||
| 4 | package Schedule::Chronic::Base; | ||||||||||
| 5 | |||||||||||
| 6 | |||||||||||
| 7 | 0 | ▶ | sub debug { | ||||||||
|
Subroutine
debug: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 8 | |||||||||||
| 9 | 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 | 0 | ▶ | sub fatal { | ||||||||
|
Subroutine
fatal: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 18 | |||||||||||
| 19 | 0 | my ($self, $msg) = @_; | |||||||||
| 20 | 0 | print STDOUT "FATAL ERROR: $msg\n"; | |||||||||
| 21 | 0 | die("\n"); | |||||||||
| 22 | |||||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | |||||||||||
| 26 | 0 | ▶ | sub which { | ||||||||
|
Subroutine
which: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 27 | |||||||||||
| 28 | 0 | my ($self, $app) = @_; | |||||||||
| 29 | |||||||||||
| 30 | 0 | my $path = `which $app`; | |||||||||
| 31 | 0 | chomp $path; | |||||||||
| 32 | |||||||||||
| 33 | 0 | ▶ | if ($path =~ /no $app/) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | 0 | return; | |||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | 0 | return $path; | |||||||||
| 38 | |||||||||||
| 39 | } | ||||||||||
| 40 | |||||||||||
| 41 | |||||||||||
| 42 | 1 | 1; | |||||||||
| 43 | |||||||||||