[EMAIL PROTECTED] (Nick Ing-Simmons) wrote:
>So you have now re-discovered why PACK001:: etc exist - to keep the
>subroutines separate.
Yup.
>FWIW I don't think the subroutines are _aliased_
>but rather _moved_ into PACK001:: etc.
Looking at the procedure, I think it's involved enough that there's not
a single word to describe it. =) It copies the coderef from MY into
PACK001 (i.e. aliases):
*{"${to}::$method"} = \&{"${from}::$method"};
Then it *doesn't* delete the original symtab entry (it's commented out):
# delete $symtab->{$method};
but it does overwrite the original method with a stub:
eval "package MY; sub $method { shift->SUPER::$method(\@_); }";
There are a lot of comments in the code to explain the rationale behind
these moves.
>In order to keep the subroutines separate each directory "needs" its own
>package. But there is no reason why those packages cannot be derived from
>a base class (It may be that way already I have rather lost track.)
Yes, they all derive from MM:: .
>Even if you don't want to make sweeping changes it would be good if you
>could write up what you have discovered about the structure(s) - and
>submit a patch that adds those docs to the "pod".
I'll do that - it will be a while before I can do it though, because I'm
going to be out of the country on vacation for a while.
------------------- -------------------
Ken Williams Last Bastion of Euclidity
[EMAIL PROTECTED] The Math Forum