lib/Rex/Cron/SunOS.pm

filter: Statementstmt 63.3% 19 / 30 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 66.6% 6 / 9 Podpod 0.0% 0 / 3 totaltotal 53.1% 25 / 47 CC 2 SCAR 7.9
CC
2
Cov
58%
new
6.0
read_user_cron
2.0
activate_user_cron
2.0
CRAP 2.2
« blib/lib/Rex/Helper/File/Spec.pm ↑ Summary lib/Rex/Hardware/Network.pm »
1 #
2 # (c) Jan Gehring <jan.gehring@gmail.com>
3 #
4  
5 package Rex::Cron::SunOS;
6  
7 1 ▶use v5.14.4;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 our $VERSION = '1.16.1'; # VERSION
11  
12 1 ▶use Rex::Cron::Base;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use base qw(Rex::Cron::Base);
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 1 ▶use Rex::Helper::Run;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 1 ▶use Rex::Commands::Fs;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
19 0 my $that = shift;
20 0 ▶ my $proto = ref($that) || $that;
Condition0%0/3
ref $that || $that
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $that || $that
ref $that $that
Truth table0%0/3
A || B
A= ref $thatB= $that
ABresult
1X1
011
000
21 0 my $self = $proto->SUPER::new(@_);
22  
23 0 bless( $self, $proto );
24  
25 0 return $self;
26 }
27  
28 0 ▶sub read_user_cron {
Subroutine read_user_cron: not called CC=1 SCAR=6.9
Pod undocumented
29 0 my ( $self, $user ) = @_;
30 0 my @lines = i_run "crontab -l $user";
31 0 $self->parse_cron(@lines);
32 }
33  
34 0 ▶sub activate_user_cron {
Subroutine activate_user_cron: not called CC=1 SCAR=6.9
Pod undocumented
35 0 my ( $self, $file, $user ) = @_;
36 0 i_run "crontab $file";
37 0 unlink $file;
38 }
39  
40 1 1;
« blib/lib/Rex/Helper/File/Spec.pm ↑ Summary lib/Rex/Hardware/Network.pm »