perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject RE: Apache::Registry family re-design
Date Fri, 07 Sep 2001 15:28:33 GMT

Now when I think more about it, we don't really need the cooker to start
with, just think of lego, rather than inheritance;

package Apache::Registry;

use Apache::Registry::Components ();

*handler     = *Apache::Registry::Components::handler_cool{CODE};
*sub_wrap    = *Apache::Registry::Components::sub_wrap_def{CODE};
*gen_package = *Apache::Registry::Components::gen_package_based_on_filename{CODE};
*should_stat = *Apache::Registry::Components::dont_stat_file{CODE};



So instead of using inheritance and waster on @ISA search, we just using
aliases. And if you want to craft your own Registry module, you just pick
the components you want from Apache::Registry::Components and alias them
to the known API, so the components will be interchangable.

Later on we can write the cooker that does this for users using more
user friendly interface, like the cook() function I've presented in my
original example.

In any case I want to generate sets of components, and once they available
you can use whichever methods you prefer to build your module of dreams.
Note that XS and Perl implementations can be crafter for each component.

I think this approach doesn't enforce us to case anything in stone and we
can reuse big chunks from the existing modules.

Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker       mod_perl Guide

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

View raw message