Enabling all MY methods of the same name in multiple modules

[email protected] (David Christensen) Thu, 15 Jul 2021 23:56:57 -0700
Newsgroups perl.module-authors
Message-ID <[email protected]>
module-authors:

I have extended EUMM in a Perl distribution by implementing a module 
that overrides various methods in the "MY" package namespace and by 
using that MY override module in Makefile.PL, per "Overriding MakeMaker 
Methods" in:

     https://metacpan.org/pod/ExtUtils::MakeMaker


I would like to split the single distribution into multiple 
distributions.  Multiple distributions will have a MY override module. 
A given MY method may be implemented in multiple modules.  A given 
Makefile.PL may 'use' one or more modules.  Method name collisions are 
expected.  I will architect the distributions to avoid circular 
dependencies.


AIUI simply use'ing modules with the same package namespace and the same 
subroutine (method) names will result in later definitions redefining 
earlier definitions, generating compiler warnings and making the earlier 
definitions inaccessible.


Is there a mechanism to daisy-chain multiple package::subroutine 
definitions such that a MY method call by EUMM will return the 
concatenated results of all definitions?


David