Index: testenv =================================================================== RCS file: /cvsroot/twiki/twiki/bin/testenv,v retrieving revision 1.51 retrieving revision 1.52 diff -U3 -u -r1.51 -r1.52 --- testenv 22 Jul 2003 10:06:19 -0000 1.51 +++ testenv 30 Jul 2003 10:54:08 -0000 1.52 @@ -277,13 +277,17 @@ my $theUrl = $query->url; # Detect whether mod_perl was loaded into Apache -my $LOAD_MOD_PERL = ( exists $ENV{'SERVER_SOFTWARE'} && +my $modPerlLoaded = ( exists $ENV{'SERVER_SOFTWARE'} && ( $ENV{'SERVER_SOFTWARE'} =~ /mod_perl/ )) && "loaded" || "not loaded"; # Detect whether we are actually running under mod_perl # - test for MOD_PERL alone, which is enough. -my $USE_MOD_PERL = ( exists $ENV{'MOD_PERL'} ) && "Used" || "Not used"; +my $usingModPerl = ( exists $ENV{'MOD_PERL'} ) && "Used" || "Not used"; + +# Get the version of mod_perl if it's being used +my $modPerlVersion = eval 'use mod_perl; return $mod_perl::VERSION' + if $usingModPerl; # OS @@ -398,6 +402,7 @@ import CGI::Carp qw( fatalsToBrowser ); +# PATH_INFO print "PATH_INFO:$thePathInfo\n"; print "Note:\n"; print "For a URL such as $theUrl/foo/bar, \n"; @@ -406,7 +411,13 @@ print "- particularly if you are using Apache or IIS, or are using a web hosting provider.\n"; print "The page resulting from the test link should have a PATH_INFO of /foo/bar.\n"; print "\n"; -print "mod_perl:$USE_MOD_PERL for this script (mod_perl $LOAD_MOD_PERL)\n"; + +# mod_perl +print "mod_perl:$usingModPerl for this script (mod_perl $modPerlLoaded)\n"; +if ( $modPerlVersion ) { + print "- mod_perl version $modPerlVersion\n"; +} +print "\n"; # Get web server's user and group info