summaryrefslogtreecommitdiffstats
path: root/checksetup.pl
diff options
context:
space:
mode:
authordkl%redhat.com <>2002-05-21 12:42:35 +0200
committerdkl%redhat.com <>2002-05-21 12:42:35 +0200
commit714614b80d9472371580b54de3d8d185864618f4 (patch)
tree581b82a3b8c7abb336e244aa1573af291c19202b /checksetup.pl
parent68fc129ecf876d028c62f8c8e3f8119d6844e02b (diff)
downloadbugzilla-714614b80d9472371580b54de3d8d185864618f4.tar.gz
bugzilla-714614b80d9472371580b54de3d8d185864618f4.tar.xz
Bug 143586 - required modules tests should be sorted. Patch by David Lawrence <dkl@redhat.com> r=justdave@syndicomm.com,bbaetz@student.usyd.edu.au
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-xchecksetup.pl54
1 files 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