blib/lib/Schedule/Cron/Nofork.pm

filter: Statementstmt 62.9% 17 / 27 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 51.1% 22 / 43 CC 4 SCAR 21.5
CC
4
Cov
50%
execute
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 8.6
↑ Summary
1 package Schedule::Cron::Nofork;
2  
3 201 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 201 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 201 ▶use base 'Schedule::Cron';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 201 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 200 $VERSION = '0.03';
11  
12 0 ▶sub execute {
Subroutine execute: not called CC=4 SCAR=30.0
Pod undocumented
13 0 my $self = shift;
14  
15 0 my $index = shift;
16 0 my $args = $self->{args}->[$index];
17  
18 0 my $dispatch = $args->[0];
19 0 ▶ die "No subroutine provided with $dispatch"
Branch: 1 branch
BranchTrueFalseTotal
unless ref $dispatch eq "CODE" 0 0 0
20 unless ref($dispatch) eq "CODE";
21 0 $args = $args->[1];
22  
23 0 my @args;
24 0 ▶ if (defined($args) && defined($args->[0])) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $args and defined $args->[0]) { } 0 0 0
Condition0%0/3
defined $args and defined $args->[0]
!ll&&!rl&&r
000
MC/DC0%0/2
defined $args and defined $args->[0]
defined $args defined $args->[0]
Truth table0%0/3
A and B
A= defined $argsB= defined $args->[0]
ABresult
0X0
100
111
25 0 push @args,@$args;
26 #dbg "Calling dispatch with ","@args";
27 } else {
28 #dbg "Calling dispatch with no args";
29 }
30  
31 0 $dispatch->(@args);
32 };
33  
34 200 1;
35 __END__
↑ Summary