Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: One module to use them all (proxy moudle that exports subs of other modules)

by syphilis (Archbishop)
on Sep 03, 2022 at 05:56 UTC ( [id://11146653]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-25 15:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found