On Wed, 2 May 2001, Matt Sergeant wrote:
 
> Right, but the problem is you can't do this after module initialization
> (which is where mod_perl adds it's bits), but the PerlModule's are loaded
> after that time, so you can't do it from Perl, at least not without a
> major re-design of the mod_perl internals. You can't even do it from XS
> loaded from Perl, because of that reason.

wha?  major re-design??  PerlModules are loaded during module init.
with this patch, i can call this from startup.pl:
Apache::add_version_component("Foo/1.1");

% HEAD http://localhost:8529/
200 OK
Connection: close
Date: Tue, 08 May 2001 15:13:12 GMT
Server: Apache/1.3.20-dev (Unix) mod_perl/1.25_01-dev Perl/v5.7.1 Foo/1.1
Content-Type: text/html
Client-Date: Tue, 08 May 2001 15:13:12 GMT
Client-Peer: 127.0.0.1:8529

--- src/modules/perl/Apache.xs~ Tue May  8 08:03:23 2001
+++ src/modules/perl/Apache.xs  Tue May  8 08:09:31 2001
@@ -371,6 +371,13 @@
 BOOT:
     items = items; /*avoid warning*/ 
 
+void
+add_version_component(name)
+    const char *name
+
+    CODE:
+    ap_add_version_component(name);
+
 const char *
 current_callback(r)
     Apache     r


Reply via email to