dougm 01/04/17 15:39:09
Modified: . Changes Makefile.PL
Log:
improve Apache::MyConfig
Revision Changes Path
1.587 +2 -0 modperl/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/modperl/Changes,v
retrieving revision 1.586
retrieving revision 1.587
diff -u -r1.586 -r1.587
--- Changes 2001/04/17 22:01:13 1.586
+++ Changes 2001/04/17 22:39:06 1.587
@@ -10,6 +10,8 @@
=item 1.25_01-dev
+improve Apache::MyConfig [Stas Bekman <[EMAIL PROTECTED]>]
+
back out 'stop win32 crash when bringing down service' change, no
longer needed with 1.3.19
[John Sterling, Will Rowe]
1.180 +18 -15 modperl/Makefile.PL
Index: Makefile.PL
===================================================================
RCS file: /home/cvs/modperl/Makefile.PL,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -r1.179 -r1.180
--- Makefile.PL 2001/04/17 21:38:52 1.179
+++ Makefile.PL 2001/04/17 22:39:07 1.180
@@ -95,6 +95,7 @@
$Apache::MyConfig::Setup{Apache_Src} ;
my $PWD = cwd;
+$ENV{APACHE_CWD} = $PWD;
$ENV{PERL5LIB} = "$PWD/lib";
my %SSL = (
@@ -1977,9 +1978,23 @@
EOS
}
- local *FH;
-# writing Configuration to Apache::MyConfig
+# preparing and writing Configuration to Apache::MyConfig
+ my %my_config = %callback_hooks;
+ my @other_hooks = qw(APACHE_SRC SSL_BASE APXS PERL_USELARGEFILES
+ PERL_TRACE PERL_DEBUG APACI_ARGS APACHE_PREFIX
+ DO_HTTPD NO_HTTPD PREP_HTTPD USE_APACI
+ APACHE_HEADER_INSTALL PERL_STATIC_EXTS );
+ {
+ no strict 'refs';
+ $my_config{$_} = ${$_} for @other_hooks;
+ }
+ my $my_config_dump = join ",\n",
+ map { qq{'$_' => } .
+ ($my_config{$_} =~ /^\d+$/ ? $my_config{$_} : qq{'$my_config{$_}'})
+ } sort keys %my_config;
+
+ local *FH;
open FH, '>lib/Apache/MyConfig.pm' ||
die "Can't open lib/Apache/MyConfig.pm: $!";
print FH <<EOT;
@@ -1989,20 +2004,8 @@
package Apache::MyConfig;
%Setup = (
- 'Apache_Src' => \'$APACHE_SRC\',
- 'SSL_BASE' => \'$SSL_BASE\',
- 'APXS' => \'$WITH_APXS\',
- 'PERL_USELARGEFILES' => \'$PERL_USELARGEFILES\',
-EOT
-
- foreach my $key (sort @callback_hooks) {
- print FH " \'$key\' => \'$callback_hooks{$key}\',\n";
- }
-
- print FH <<EOT;
- $string
+$my_config_dump
);
-
1;
__END__