Juan Julian Merelo Guervos wrote:
Hi,
	Well, looks like I've managed to make this server run (thanks for your
help), and looks like, in this case, mod_cgi is working (unlike the one
shipped with RH 8.0). Now I'm trying to make HTML::Mason work with this
configuration. I have downloaded HTML::Mason 1.15, and force-compiled
it. This one requires libapreq, which I haven't been able to compile,
since it requires Apache::MyConfig . That's supposed to be in the old
version of mod_perl, right? So, the only way to have HTML::Mason working
is to have both things working at the same time? Any other option? Has
anybody made HTML::Mason work with this prerrelease of mod_perl?
I did a quick stub on porting Apache::MyConfig, it's incomplete so please post any fixes (which should be pretty easy to figure out) for those keys that weren't set yet. So here is the patch.

Index: lib/Apache/compat.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
retrieving revision 1.71
diff -u -r1.71 compat.pm
--- lib/Apache/compat.pm 23 Nov 2002 22:35:06 -0000 1.71
+++ lib/Apache/compat.pm 28 Nov 2002 16:52:49 -0000
@@ -509,5 +509,80 @@
APR::Table::make($r->pool, $nelts);
}

+package Apache::MyConfig;
+
+use Apache::Build ();
+
+use constant WIN32 => Apache::Build::WIN32;
+
+our %Setup;
+
+my $build = Apache::Build->new();
+
+my $XXX = "Need to figure out";
+my $LEGACY = '';
+
+%Setup = (
+ APACHE_SRC => $build->MP_AP_PREFIX, # can be not source
+ SSL_BASE => $LEGACY,
+ APXS => $build->apxs,
+ PERL_USELARGEFILES => $XXX, # XXX
+ PERL_TRACE => $build->MP_TRACE,
+ PERL_DEBUG => $build->MP_debug,
+ APACI_ARGS => $LEGACY,
+ APACHE_PREFIX => $build->MP_AP_PREFIX,
+ DO_HTTPD => 1, # always DO_HTTPD
+ NO_HTTPD => 0, # always DO_HTTPD
+ PREP_HTTPD => 0, # always DO_HTTPD
+ USE_APACI => 0, # no more
+ APACHE_HEADER_INSTALL => 1, #
+ PERL_STATIC_EXTS => $XXX,
+ PERL_SSI => 0, # legacy
+ USE_APXS => $XXX, # only for non-win?
+);
+
+my @callback_hooks = qw{
+ PERL_DISPATCH
+ PERL_CHILD_INIT
+ PERL_CHILD_EXIT
+ PERL_POST_READ_REQUEST
+ PERL_TRANS
+ PERL_HEADER_PARSER
+ PERL_ACCESS
+ PERL_AUTHEN PERL_AUTHZ
+ PERL_TYPE
+ PERL_FIXUP
+ PERL_HANDLER
+ PERL_LOG
+ PERL_INIT
+ PERL_CLEANUP
+ PERL_RESTART
+ PERL_STACKED_HANDLERS
+ PERL_METHOD_HANDLERS
+ PERL_DIRECTIVE_HANDLERS
+ PERL_TABLE_API
+ PERL_LOG_API
+ PERL_URI_API
+ PERL_UTIL_API
+ PERL_FILE_API
+ PERL_CONNECTION_API
+ PERL_SERVER_API
+ PERL_SECTIONS
+};
+
+# we have all the APIs available, just need to load their modules
+$Setup{$_} = 1 for @callback_hooks;
+
+if (WIN32) {
+ $Setup{APACHE_INC} = $build->{APXS_INCLUDEDIR};
+ $Setup{APACHE_LIB} = $XXX;
+ $Setup{MODPERL_INC} = $build->{MODPERL_INC};
+ $Setup{MODPERL_LIB} = $XXX; # win32 lib?
+}
+
+#need this alias for Apache::src backwards compat
+$Setup{Apache_Src} = $Setup{APACHE_SRC};
+
+
1;
__END__




__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com



Reply via email to