ZofCMS/Plugin/InstalledModuleChecker.pm

filter: Statementstmt 40.0% 8 / 20 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod 0.0% 0 / 2 totaltotal 31.2% 10 / 32 CC 5 SCAR 29.6
CC
5
Cov
31%
process
30.0
new
2.0
BEGIN
1.0
CRAP 19.2
« ZofCMS/Plugin/ConditionalRedirect.pm ↑ Summary ZofCMS/Plugin/AntiSpamMailTo.pm »
1 package App::ZofCMS::Plugin::InstalledModuleChecker;
2  
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $VERSION = '1.001010'; # VERSION
7  
8 0 ▶sub new { bless {}, shift }
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
9 0 ▶sub process {
Subroutine process: not called CC=5 SCAR=34.0
Pod undocumented
10 0 my ( $self, $t, $q, $config ) = @_;
11  
12 0 my $modules = delete $t->{plug_installed_module_checker};
13  
14 $modules = delete $config->conf->{plug_installed_module_checker}
15 0 ▶ unless defined $modules;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $modules 0 0 0
16  
17 return
18 0 ▶ unless defined $modules;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $modules 0 0 0
19  
20 0 my @results;
21 0 for ( @$modules ) {
22 0 eval "use $_";
23 0 ▶ if ( $@ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) { } 0 0 0
24 0 push @results, { info => "$_ IS NOT INSTALLED: $@" };
25 }
26 else {
27 0 push @results, { info => "$_ IS INSTALLED [version " . $_->VERSION . " ]" };
28 }
29 }
30 0 $t->{t}{plug_installed_module_checker} = \@results;
31 }
32  
33 1 1;
34 __END__
« ZofCMS/Plugin/ConditionalRedirect.pm ↑ Summary ZofCMS/Plugin/AntiSpamMailTo.pm »