From: Richard D. <rd...@us...> - 2002-11-15 14:25:10
|
Update of /cvsroot/twiki/twiki/bin In directory usw-pr-cvs1:/tmp/cvs-serv16074 Modified Files: testenv Log Message: Avoids in-browser errors when modules are not present on some Perl setups, through better use of fatalsToBrowser. Fixes output seen in attachment on Support.HowToGetWebActionWorking. Index: testenv =================================================================== RCS file: /cvsroot/twiki/twiki/bin/testenv,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** testenv 3 Nov 2002 17:12:07 -0000 1.30 --- testenv 15 Nov 2002 14:25:01 -0000 1.31 *************** *** 110,114 **** require CGI; require CGI::Carp; ! import CGI::Carp qw( fatalsToBrowser ); my $query = new CGI; --- 110,114 ---- require CGI; require CGI::Carp; ! # Don't do fatalsToBrowser until after module loads, to avoid errors. my $query = new CGI; *************** *** 252,256 **** # Add to list of required modules if non-Unix, or MacOS X (detected by ! # Perl as 'Darwin) if ( $detailedOS =~ /darwin/i or $OS ne 'UNIX' ) { push @requiredMods, @requiredModsNonUnix; --- 252,256 ---- # Add to list of required modules if non-Unix, or MacOS X (detected by ! # Perl as 'Darwin') if ( $detailedOS =~ /darwin/i or $OS ne 'UNIX' ) { push @requiredMods, @requiredModsNonUnix; *************** *** 293,296 **** --- 293,301 ---- print "</td></tr>\n"; } + + + # All module checks done, OK to enable fatalsToBrowser + import CGI::Carp qw( fatalsToBrowser ); + print "<tr><th align=\"right\">PATH_INFO:<a name=\"PATH_INFO\"></th><td>$thePathInfo</td></tr>\n"; |