Just another Perl shrine | |
PerlMonks |
Re: Re: A module to merge packagesby dakkar (Hermit) |
on Jun 26, 2002 at 13:55 UTC ( [id://177383]=note: print w/replies, xml ) | Need Help?? |
I know of Schwern's Sex, but what the two modules do is different. My Merge creates a package whose @ISA is a list I specify. Sex creates a package by mixing up symbol table entries, both subs and variables, and (by the way) pushing the "parents" into the "child"'s @ISA. My first solution was a simplification of Sex (with less error checking, no schwernian messages, and no randomness), but it creates problem with classes, and makes it impossible to use NEXT to add functionality to a method, in something like:
In Section
Seekers of Perl Wisdom
|
|