perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: removing PerlLoadModule directive handler requirement
Date Wed, 21 May 2003 02:15:35 GMT

> You know, it seems that PerlLoadModule is a misleading name. It suggests 
> that its purpose is to load a module. 

well, in some sense it does - it's the Perl equivalent of LoadModule which, 
in part, populates the module record and makes it possible to handle 
directives. the problem, I think, is in having the code for PerlLoadModule 
so specific to directive handlers - there are clearly other reasons you 
might want to invoke Perl early, so limiting that behavior to directive 
handlers doesn't seem right.

in thinking about it, I like the name, so long as it does actually load the 
module and make it possible to have the Perl equivalent of module init - 
calling post_config stuff, handling directives, registering providers, etc. 
  in truth, I don't understand why PerlModule behaves the way it does now, 
but in changing behaviors between mp1 and mp2 you've lost the ability to do 
module init stuff.

I think what I'd like to see is the directive handler support stripped away 
from the PerlLoadModule implementation a bit, making PerlLoadModule 
equivalent to PerlModule except that PerlLoadModule starts perl on demand 
rather than when required.  directive handlers would be noted to require 
PerlLoadModule, in much the same way as mp1 requires PerlModule over simple 
use() statements.

well, that's my $0.02... and I know, patches welcome :)

--Geoff


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


Mime
View raw message