File Coverage

bin/ubic-watchdog
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 20 20 100.0


line stmt bran cond sub pod time code
1             #!/usr/bin/env perl
2             package ubic_watchdog;
3             $ubic_watchdog::VERSION = '1.60';
4 1     1   607 use strict;
  1         1  
  1         21  
5 1     1   3 use warnings;
  1         1  
  1         21  
6              
7             # ABSTRACT: watchdog which checks all ubic services.
8              
9              
10 1     1   3 use Getopt::Long 2.33;
  1         4  
  1         16  
11 1     1   81 use Pod::Usage;
  1         1  
  1         52  
12              
13 1     1   4 use Ubic::Watchdog;
  1         1  
  1         121  
14              
15             return 1 if caller();
16             unless (grep { $_ eq '/usr/local/bin' } split /:/, $ENV{PATH}) {
17             $ENV{PATH} = "/usr/local/bin:$ENV{PATH}";
18             }
19              
20             my $compile_timeout = 10;
21             my $verbose;
22              
23             GetOptions(
24             'v|verbose' => \$verbose,
25             'compile-timeout=i' => \$compile_timeout,
26             ) or pod2usage(2);
27              
28             Ubic::Watchdog->run(
29             glob_filter => \@ARGV,
30             verbose => $verbose,
31             compile_timeout => $compile_timeout,
32             );
33              
34             __END__