[system] / trunk / webwork-modperl / lib / WeBWorK / PG / Local.pm Repository:
ViewVC logotype

Diff of /trunk/webwork-modperl/lib/WeBWorK/PG/Local.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 4194 Revision 4195
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2006 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork-modperl/lib/WeBWorK/PG/Local.pm,v 1.19 2006/01/25 23:13:56 sh002i Exp $ 4# $CVSHeader: webwork2/lib/WeBWorK/PG/Local.pm,v 1.20 2006/05/21 00:50:04 gage Exp $
5# 5#
6# This program is free software; you can redistribute it and/or modify it under 6# This program is free software; you can redistribute it and/or modify it under
7# the terms of either: (a) the GNU General Public License as published by the 7# the terms of either: (a) the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any later 8# Free Software Foundation; either version 2, or (at your option) any later
9# version, or (b) the "Artistic License" which comes with this package. 9# version, or (b) the "Artistic License" which comes with this package.
39use warnings; 39use warnings;
40use WeBWorK::Constants; 40use WeBWorK::Constants;
41use File::Path qw(rmtree); 41use File::Path qw(rmtree);
42use WeBWorK::PG::Translator; 42use WeBWorK::PG::Translator;
43use WeBWorK::Utils qw(readFile writeTimingLogEntry); 43use WeBWorK::Utils qw(readFile writeTimingLogEntry);
44
45use mod_perl;
46use constant MP2 => ( exists $ENV{MOD_PERL_API_VERSION} and $ENV{MOD_PERL_API_VERSION} >= 2 );
44 47
45# Problem processing will time out after this number of seconds. 48# Problem processing will time out after this number of seconds.
46use constant TIMEOUT => $WeBWorK::PG::Local::TIMEOUT || 10; 49use constant TIMEOUT => $WeBWorK::PG::Local::TIMEOUT || 10;
47 50
48BEGIN { 51BEGIN {
108 }); 111 });
109 112
110 # evaluate modules and "extra packages" 113 # evaluate modules and "extra packages"
111 #warn "PG: evaluating modules and \"extra packages\"\n"; 114 #warn "PG: evaluating modules and \"extra packages\"\n";
112 my @modules = @{ $ce->{pg}->{modules} }; 115 my @modules = @{ $ce->{pg}->{modules} };
116 # HACK for apache2
117 if (MP2) {
118 push @modules, ["Apache2::Log"], ["APR::Table"];
119 } else {
120 push @modules, ["Apache::Log"];
121 }
113 foreach my $module_packages_ref (@modules) { 122 foreach my $module_packages_ref (@modules) {
114 my ($module, @extra_packages) = @$module_packages_ref; 123 my ($module, @extra_packages) = @$module_packages_ref;
115 # the first item is the main package 124 # the first item is the main package
116 $translator->evaluate_modules($module); 125 $translator->evaluate_modules($module);
117 # the remaining items are "extra" packages 126 # the remaining items are "extra" packages

Legend:
Removed from v.4194  
changed lines
  Added in v.4195

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9