#!/usr/bin/perl -w # $Header: /home/cvs/cvsroot/freeside/rt/tools/Attic/testdeps,v 1.1 2002-08-12 06:17:08 ivan Exp $ # Copyright 2000 Jesse Vincent # Distributed under the GNU General Public License # # # This is just a basic script that checks to make sure that all # the modules needed by RT before you can install it. # use strict; use vars qw($mode $dbd $module @modules); $mode = shift || print_help(); $dbd = shift || print_help(); @modules = qw( Digest::MD5 Storable DBI 1.18 DBIx::DataSource 0.02 DBIx::SearchBuilder 0.48 HTML::Entities MLDBM Net::Domain Net::SMTP Params::Validate 0.02 HTML::Mason 1.02 CGI::Cookie 1.20 Apache::Cookie Apache::Session 1.53 Date::Parse Date::Format MIME::Entity 5.108 Mail::Mailer 1.20 Getopt::Long 2.24 Tie::IxHash Text::Wrapper Text::Template File::Spec 0.8 Errno FreezeThaw File::Temp Log::Dispatch 1.6 ); if ($dbd =~ /mysql/i) { push @modules, ('DBD::mysql','2.0416'); } elsif ($dbd =~ /oracle/i) { push @modules, ('DBD::Oracle',''); } elsif ($dbd =~ /pg/i) { push @modules, ('DBD::Pg',''); } use CPAN; while ($module= shift @modules) { my $version = ""; $version = " ". shift (@modules) . " " if ($modules[0] =~ /^([\d\.]*)$/); print "Checking for $module$version"; eval "use $module$version" ; if ($@) { &resolve_dependency($module, $version) } else { print "...found\n"; } } sub print_help { print <