perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject removing PerlLoadModule directive handler requirement
Date Tue, 20 May 2003 13:32:24 GMT
hi all...

   I'd like to suggest that we remove the requirement that modules loaded with 
PerlLoadModule need to have directive handler support.

   now that PerlModule defers init processing until after the interpreter has started, 
there is currently now way to force an early interpreter invocation for actions that are 
required on startup.  for instance, in addition to directive handler support, the new aaa

ap_register_provider hook needs to be called at startup before the authen modules see the

Auth*Provider statements in httpd.conf (otherwise the server won't start).  so, if I want

my Perl module to register a provider, I don't have any way to get the call in early 
enough unless I provide some dummy directive handlers (well, I can force some <Perl>

sections in there to trick the early interpreter, but :)

   anyway, I'm suggesting that PerlLoadModule be available to all handlers that require an

interpreter be created early, not merely directive handlers.  the below patch is simple 
enough and does the trick.  all tests pass for me.

--Geoff

Index: src/modules/perl/modperl_module.c
===================================================================
RCS file: /home/cvspublic/modperl-2.0/src/modules/perl/modperl_module.c,v
retrieving revision 1.13
diff -u -r1.13 modperl_module.c
--- src/modules/perl/modperl_module.c   12 May 2003 13:00:15 -0000      1.13
+++ src/modules/perl/modperl_module.c   20 May 2003 13:09:19 -0000
@@ -636,8 +636,7 @@
  #endif

      if (!(module_cmds = modperl_module_cmds_get(aTHX_ modp))) {
-        return apr_pstrcat(p, "module ", modp->name,
-                           " does not define @APACHE_MODULE_COMMANDS", NULL);
+        return NULL;
      }

      fill = AvFILL(module_cmds);


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message