Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 59988 invoked by uid 500); 11 Feb 2003 22:58:05 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 59750 invoked from network); 11 Feb 2003 22:58:03 -0000 From: =?ISO-8859-1?Q?Andr=E9?= Malo Subject: method registry in request_config? MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Organization: TIMTOWTDI Date: Tue, 11 Feb 2003 23:58:17 +0100 To: dev@httpd.apache.org Message-ID: User-Agent: Yes! X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N (I'm currently working on a forward port of mod_actions' ability to handle= =20 any arbitrary method. This can simply be done by registering the particular= =20 method, but ...) The current method registry is a static hash. Hmm. Once an unknown method= =20 is used (say, in in directory context), it will be registered and= =20 stay there until apache ends. If you have some users, that try out some methods (maybe accidentally),=20 then the list fills up. I think, a better way to handle the method registry= =20 would be as follows: - keep a static list, so that modules can register permanent methods at=20 startup. After startup (post_config-hook?) the static list will be closed= =20 (i.e., no further entries allowed). - if now during the requesr phase some module registers a method it will be= =20 stored within an additional hash stored in r->request_config (of core?).=20 Thus the static list will be kept "clean". The method_register API can easily hide these details, so that shouldn't be= =20 a problem for other modules. WDYT? nd --=20 my @japh =3D (sub{q~Just~},sub{q~Another~},sub{q~Perl~},sub{q~Hacker~}); my $japh =3D q[sub japh { }]; print join ######################### [ $japh =3D~ /{(.)}/] -> [0] =3D> map $_ -> () # Andr=E9 Malo # =3D> @japh; # http://pub.perlig.de/ #