You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Geoffrey Young <gy...@laserlink.net> on 2001/07/16 20:46:45 UTC

directive handlers in 2.0

hi doug...

  what's the game plan for directive handlers in 2.0.  I was playing around
with them in 1.3 quite heavily last week and found myself wondering if it
wouldn't be cool to have a generic mechanism that you could slip into the
module record that would allow you to dispense with the Perl*Handler line
(if you wanted to).  doesn't seem that hard if you plan for it, though it'd
be a kludge to get it into 1.3 it looks like.

not much of a gain, but pretty cool for transparently overriding core
directives, since you currently need 3 directives (PerlModule, Perl*Handler,
Directive) to override a C module and have to remember to put the
Perl*Handler everywhere you will need it.

just a thought, as you add things to your feature list :)

--Geoff

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


Re: directive handlers in 2.0

Posted by Matt Sergeant <ma...@sergeant.org>.
On Tue, 17 Jul 2001, Doug MacEachern wrote:

> On 17 Jul 2001, Matt Sergeant wrote:
>
> > I don't. It's not documented, it was just an experiment. I wanted to see
> > if it would work :-)
>
> oh, ok.  when you said "that's slightly incorrect", i thought you meant
> LoadModule should be used instead of PerlModule.
>
> > Actually I also wanted to see if it would change the way AxKit reacted
> > with PHP, rather than relying on mod_perl's code to do all the
> > reloading. But it didn't change anything :-)
>
> does the current version of axkit still had problems with php loaded?

I don't think so. Though I may be past caring :-)

There are reports of it working with PHP, so I'm assuming it's OK in at
least some configurations.

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\


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


Re: directive handlers in 2.0

Posted by Doug MacEachern <do...@covalent.net>.
On 17 Jul 2001, Matt Sergeant wrote:

> I don't. It's not documented, it was just an experiment. I wanted to see
> if it would work :-)

oh, ok.  when you said "that's slightly incorrect", i thought you meant
LoadModule should be used instead of PerlModule.

> Actually I also wanted to see if it would change the way AxKit reacted
> with PHP, rather than relying on mod_perl's code to do all the
> reloading. But it didn't change anything :-)

does the current version of axkit still had problems with php loaded?



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


Re: directive handlers in 2.0

Posted by Matt Sergeant <ma...@sergeant.org>.
On 16 Jul 2001 17:56:13 -0700, Doug MacEachern wrote:
> On 16 Jul 2001, Matt Sergeant wrote:
>  
> > However you still need PerlModule AxKit, to load the .so (actually even
> > that's slightly incorrect - I have it working so you can do LoadModule
> > /path/to/AxKit.so).
> 
> eek, why would you want to use 'LoadModule /path/to/AxKit.so' rather than
> 'PerlModule AxKit' ?  the latter seems much more user-friendly.
>

I don't. It's not documented, it was just an experiment. I wanted to see
if it would work :-)

Actually I also wanted to see if it would change the way AxKit reacted
with PHP, rather than relying on mod_perl's code to do all the
reloading. But it didn't change anything :-)

Matt.


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


Re: directive handlers in 2.0

Posted by Doug MacEachern <do...@covalent.net>.
On 16 Jul 2001, Matt Sergeant wrote:
 
> However you still need PerlModule AxKit, to load the .so (actually even
> that's slightly incorrect - I have it working so you can do LoadModule
> /path/to/AxKit.so).

eek, why would you want to use 'LoadModule /path/to/AxKit.so' rather than
'PerlModule AxKit' ?  the latter seems much more user-friendly.


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


Re: directive handlers in 2.0

Posted by Matt Sergeant <ma...@sergeant.org>.
On 16 Jul 2001 14:46:45 -0400, Geoffrey Young wrote:
> hi doug...
> 
>   what's the game plan for directive handlers in 2.0.  I was playing around
> with them in 1.3 quite heavily last week and found myself wondering if it
> wouldn't be cool to have a generic mechanism that you could slip into the
> module record that would allow you to dispense with the Perl*Handler line
> (if you wanted to).  doesn't seem that hard if you plan for it, though it'd
> be a kludge to get it into 1.3 it looks like.

Actually it'd be fairly trivial. I've done AddHandler axkit for AxKit
1.4_80, so I'm sure it could be done for any other directive handler
based thingy.

However you still need PerlModule AxKit, to load the .so (actually even
that's slightly incorrect - I have it working so you can do LoadModule
/path/to/AxKit.so).

Matt.


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


Re: directive handlers in 2.0

Posted by Doug MacEachern <do...@covalent.net>.
On Mon, 16 Jul 2001, Geoffrey Young wrote:

> hi doug...
> 
>   what's the game plan for directive handlers in 2.0.  I was playing around
> with them in 1.3 quite heavily last week and found myself wondering if it
> wouldn't be cool to have a generic mechanism that you could slip into the
> module record that would allow you to dispense with the Perl*Handler line
> (if you wanted to).  doesn't seem that hard if you plan for it, though it'd
> be a kludge to get it into 1.3 it looks like.
> 
> not much of a gain, but pretty cool for transparently overriding core
> directives, since you currently need 3 directives (PerlModule, Perl*Handler,
> Directive) to override a C module and have to remember to put the
> Perl*Handler everywhere you will need it.

in 1.x you can already do this:

push @Apache::ReadConfig::Perl*Handler, 'Apache::Foo';

2.0 will probably have something like register_hooks for Perl too.

thing is, i think using directives to configure perl modules is better
than having the modules always be called for a given hook.  by forcing
them to be configured in httpd.conf, chances are they will be called less,
rather than always called and return DECLINED if they are not enabled some
other way. the fewer calls into the perl runtime we make, the better the
server will perform.

as for directive handlers, i'd like to avoid having to generate xs code.
but haven't thought about it much yet.


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