in reply to Re^2: One module to use them all (proxy moudle that exports subs of other modules)
in thread One module to use them all (proxy moudle that exports subs of other modules)

And this breaks everything :-(

I don't see how the absence of Exporter in any of those modules would cause breakage.
Can you provide more details ?

Cheers,
Rob
  • Comment on Re^3: One module to use them all (proxy moudle that exports subs of other modules)

Replies are listed 'Best First'.
Re^4: One module to use them all (proxy moudle that exports subs of other modules)
by pryrt (Abbot) on Sep 04, 2022 at 22:35 UTC
    I don't see how the absence of Exporter in any of those modules would cause breakage. Can you provide more details ?

    Because the solutions that assume Exporter specifically assume the existance of @EXPORT in every one of the sub-modules. My Two.pm does not contain @EXPORT, and thus none of Two.pm's functions would be exported to the tldr script if my ::All had our @EXPORT = (@Mod11146642::One::EXPORT, @Mod11146642::Two::EXPORT); instead of the our @EXPORT = @inherited; and the stash-diff that populated @inherited. If I used the EXPORT-assuming line, ignoring @inherited, I would get

    C:\usr\local\share\PassThru\perl\perlmonks > 11146642-tldr.pl Called Mod11146642::One::oneFunction() Undefined subroutine &main::twoFunction called at C:\usr\local\share\P +assThru\perl\perlmonks\11146642-tldr.pl line 14.