From cdb0210e8c8892ab9ab88e92735bcaefdc9bd024 Mon Sep 17 00:00:00 2001 From: Mason James Date: Mon, 10 Oct 2022 07:10:25 +1300 Subject: [PATCH] =?UTF-8?q?Bug=C2=A031865:=20hide=20development=20modules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" --- C4/Installer/PerlModules.pm | 3 +++ about.pl | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/C4/Installer/PerlModules.pm b/C4/Installer/PerlModules.pm index 5d4a84ecda..fdf4ac0e49 100644 --- a/C4/Installer/PerlModules.pm +++ b/C4/Installer/PerlModules.pm @@ -21,11 +21,13 @@ sub new { sub prereqs { my $self = shift; + my @phases; unless (defined $self->{prereqs}) { my $filename = $INC{'C4/Installer/PerlModules.pm'}; my $path = dirname(dirname(dirname($filename))); $self->{prereqs} = Module::CPANfile->load("$path/cpanfile")->prereqs; + @phases = $self->{prereqs}->phases; } return $self->{prereqs}; @@ -58,6 +60,7 @@ sub versions_info { my $module_infos = { cur_ver => 0, required => $type eq 'requires', + phase => $phase }; my $vers = $reqs->structured_requirements_for_module($module); diff --git a/about.pl b/about.pl index e92015fbc7..d34f39c56c 100755 --- a/about.pl +++ b/about.pl @@ -661,6 +661,12 @@ foreach my $pm_type(@pm_types) { my $modules = $perl_modules->get_attr($pm_type); foreach (@$modules) { my ($module, $stats) = each %$_; + + # skip 'development' modules from displaying, unless its a dev install + unless ( $ENV{DEV_INSTALL} ) { + next if $stats->{'phase'} eq 'develop' ; + } + push( @components, { @@ -697,7 +703,6 @@ if (scalar(@$row) > 0) { # Pushing the last line push (@$table, {row => $row}); } -## ## $table $template->param( table => $table ); -- 2.20.1