Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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 ( [id://11146687]=note: print w/replies, xml ) Need Help??


in reply to Re^3: 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)

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11146687]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-04-19 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found