From: <Wil...@nt...> - 2005-05-02 13:57:51
|
Author: WillNorris Date: 2005-05-02 06:56:08 -0700 (Mon, 02 May 2005) New Revision: 4231 Modified: twiki/branches/DEVELOP/test/tinderbox/doit.pl Log: DailyBuildAndSmokeTest: can print out module versions (for diagnose dependency and installation problems) Modified: twiki/branches/DEVELOP/test/tinderbox/doit.pl =================================================================== --- twiki/branches/DEVELOP/test/tinderbox/doit.pl 2005-05-02 13:43:20 UTC (rev 4230) +++ twiki/branches/DEVELOP/test/tinderbox/doit.pl 2005-05-02 13:56:08 UTC (rev 4231) @@ -39,6 +39,27 @@ pod2usage({ -exitval => 1, -verbose => 2 }) if $Config->{man}; print STDERR Dumper( $Config ) if $Config->{debug}; +# check for prerequisites +my $prereq = { + 'WWW::Mechanize::TWiki' => { version => '0.09' }, + 'LWP::UserAgent' => { }, + 'WWW::Mechanize' => { }, +}; + +if ( $Config->{debug} ) +{ + print "Installed Required CPAN Module\n"; + while ( my ( $module, $value ) = each %$prereq ) + { + eval "require $module" or die $!; + my $minVersion = $value->{version} || 0; + my $moduleVersion = $module->VERSION; + print sprintf("%-9s %-8s %s", $moduleVersion, ( $minVersion || '' ), $module ); + print "\tERROR!" if $moduleVersion < $minVersion; + print "\n"; + } +} + my $TWIKIDEV = $ENV{TWIKIDEV}; die "must set environment variable TWIKIDEV" unless $TWIKIDEV; |