From 714614b80d9472371580b54de3d8d185864618f4 Mon Sep 17 00:00:00 2001 From: "dkl%redhat.com" <> Date: Tue, 21 May 2002 10:42:35 +0000 Subject: Bug 143586 - required modules tests should be sorted. Patch by David Lawrence r=justdave@syndicomm.com,bbaetz@student.usyd.edu.au --- checksetup.pl | 54 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/checksetup.pl b/checksetup.pl index 18896b158..620afe99d 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -174,20 +174,50 @@ sub have_vers { } # Check versions of dependencies. 0 for version = any version acceptible -my %modules = ( - "DBI" => "1.13", - "Data::Dumper" => "0", - "DBD::mysql" => "1.2209", - "Date::Parse" => "0", - "AppConfig" => "1.52", - "Template" => "2.07", - "Text::Wrap" => "2001.0131", - "File::Spec" => "0.82" -); +my $modules = [ + { + name => 'AppConfig', + version => '1.52' + }, + { + name => 'CGI::Carp', + version => '0' + }, + { + name => 'Data::Dumper', + version => '0' + }, + { + name => 'Date::Parse', + version => '0' + }, + { + name => 'DBI', + version => '1.13' + }, + { + name => 'DBD::mysql', + version => '1.2209' + }, + { + name => 'File::Spec', + version => '0.82' + }, + { + name => 'Template', + version => '2.07' + }, + { + name => 'Text::Wrap', + version => '2001.0131' + } +]; my %missing = (); -foreach my $module (keys %modules) { - unless (have_vers($module, $modules{$module})) { $missing{$module} = $modules{$module} } +foreach my $module (@{$modules}) { + unless (have_vers($module->{name}, $module->{version})) { + $missing{$module->{name}} = $module->{version}; + } } # If CGI::Carp was loaded successfully for version checking, it changes the -- cgit v1.2.3-24-g4f1b