Branch Coverage

blib/lib/cPanel/TaskQueue/PluginManager.pm
Criterion Covered Total %
branch 30 34 88.2


line true false branch
40 2 5 unless exists $opts{'directories'} and 'ARRAY' eq ref $opts{'directories'}
41 2 3 unless exists $opts{'namespaces'} and 'ARRAY' eq ref $opts{'namespaces'}
52 2 13 unless defined $root_dir and length $root_dir
53 1 12 unless -d $root_dir
54 1 11 unless grep {$_ eq $root_dir;} @INC
56 2 9 unless defined $namespace and length $namespace
57 1 8 unless $namespace =~ /^ \w+ (?: :: \w+ )* $/x
63 4 4 unless -d $ns_dir
65 0 4 unless opendir my $dir, $ns_dir
67 0 4 unless closedir $dir
70 23 0 /^(\w+)\.pm$/ && -f "$ns_dir/$_" ? :
80 4 26 if exists $plugins_list{$modname}
83 5 21 if ($@)
89 4 17 unless (defined $register)
96 19 15 unless ('ARRAY' eq ref $reg and 2 == @{$reg;})
100 0 15 unless (eval { do { 'cPanel::TaskQueue'->register_task_processor(@{$reg;}) } })
108 10 7 if ($num_reg)