| 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
| |||||||||||
| 16 | |||||||||||
| 17 | return | ||||||||||
| 18 | 0 | ▶ | unless defined $modules; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | |||||||||||
| 20 | 0 | my @results; | |||||||||
| 21 | 0 | for ( @$modules ) { | |||||||||
| 22 | 0 | eval "use $_"; | |||||||||
| 23 | 0 | ▶ | if ( $@ ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 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__ | ||||||||||