On Thu, 28 Sep 2000, David L. Nicol wrote:

> First we create a virtual environment to load the package into, then we
> define the methods we wish to overload, then we define all the methods
> to pass through the args -- No, this is not needed at all, we can use ISA
> for that can't we!
>  
>    package Frog;
> 
>    @ISA = qw('VIRTUALZONE::Frog');
>    sub speak { print "kerokero"; }
> 
> which means that all that is required is a package root changer.
> I wonder how hard that would be to implement.

Although the argument for this particular example becomes somewhat
contrived, (if I understand your suggestion correctly) what happens when I
want to add a third level of sub-collection?  With inheritence trees, it's
easy to see which one will be used.  By providing a single location where
/ALL/ overloaded packages would go (VIRTUALZONE::${PACKAGE}), you limit
yourself in the amount a class (or class collection) may be extended.

Other than that, the idea of only needing a package root changer is
perhaps the one essential in implementing someting along these lines.

As sunday is the deadline for either freezing or retracting (implicitly or
explicitly) RFCs, barring catastrophe or mass email suggesting otherwise,
I will freeze this RFC sunday night (hopfully with a few more words on
why I think this is a good way to solve the problem).

.greg

Reply via email to