perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: exit and ModPerl::Util::exit
Date Thu, 23 Dec 2004 00:14:35 GMT
Geoffrey Young wrote:
>>>you wouldn't want to just import the namespaces required during
>>Sorry, Geoff, I don't understand what do you ask. You talk about the 3rd
> well, kinda.  isn't the issue that ModPerl::Util isn't imported?  I mean,
> clearly ModPerl::Util::exit has been defined, but the module as a whole
> hasn't been use()d yet.  

You don't need to import it. We did that in mp1, in mp2 we do:

*CORE::GLOBAL::exit = \&ModPerl::Util::exit.

but in C.

>so, something like this
> typedef struct {
>     const char *name;
>     const char *package;
>     const char *sub_name;
>     const char *core_name;
> } modperl_perl_core_global_t;
>      while (cglobals->name) {
>          [code that requires cglobals->package]
>          GV *gv = gv_fetchpv(cglobals->core_name, TRUE, SVt_PVCV);
>          GvCV(gv) = get_cv(cglobals->sub_name, TRUE);
>          GvIMPORTED_CV_on(gv);
>          cglobals++;
>      }
> I would think would be sufficient, rather than moving the entire
> ModPerl::Util class into core. 

we don't do that. You still need to load ModPerl::Util to get the other 
functions. It's just that we choose that exit() belongs to that namespace, 
but it doesn't live in the XS module anymore.

> but my brain has been on another planet
> recently, so don't let me stop your progress or pull you into a
> time-straining discussion if I'm not correct.  just go with what you and
> philippe think is best.


Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message