File Coverage

lib/Rex/Cron/SunOS.pm
Criterion Covered Total %
statement 17 28 60.7
branch n/a
condition 0 3 0.0
subroutine 6 9 66.6
pod 0 3 0.0
total 23 43 53.4


line stmt bran cond sub pod time code
1             #
2             # (c) Jan Gehring
3             #
4              
5             package Rex::Cron::SunOS;
6              
7 1     1   15 use v5.12.5;
  1         9  
8 1     1   8 use warnings;
  1         1  
  1         49  
9              
10             our $VERSION = '1.14.3'; # VERSION
11              
12 1     1   11 use Rex::Cron::Base;
  1         3  
  1         19  
13 1     1   27 use base qw(Rex::Cron::Base);
  1         10  
  1         83  
14              
15 1     1   8 use Rex::Helper::Run;
  1         2  
  1         75  
16 1     1   8 use Rex::Commands::Fs;
  1         4  
  1         8  
17              
18             sub new {
19 0     0 0   my $that = shift;
20 0   0       my $proto = ref($that) || $that;
21 0           my $self = $proto->SUPER::new(@_);
22              
23 0           bless( $self, $proto );
24              
25 0           return $self;
26             }
27              
28             sub read_user_cron {
29 0     0 0   my ( $self, $user ) = @_;
30 0           my @lines = i_run "crontab -l $user";
31 0           $self->parse_cron(@lines);
32             }
33              
34             sub activate_user_cron {
35 0     0 0   my ( $self, $file, $user ) = @_;
36 0           i_run "crontab $file";
37 0           unlink $file;
38             }
39              
40             1;