Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^5: Importing multiple %EXPORT_TAGS

by jcb (Parson)
on Dec 29, 2020 at 03:52 UTC ( [id://11125912]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Importing multiple %EXPORT_TAGS
in thread Importing multiple %EXPORT_TAGS

I am fairly sure the separation is needed, unless you can point to documentation somewhere that says the values used to initialize a hash will always be evaluated left-to-right. Otherwise, your code may work now, but is relying on undefined behavior and may stop working in a future version of perl.

The problem is that _export_private modifies @EXPORT_OK, so the order in which [@EXPORT_OK] and _export_private() are evaluated matters. If the list values are evaluated right-to-left in some future version of perl, you will be right back where you were, as the internal functions will be added to @EXPORT_OK just before the array is copied for the :all tag.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-20 15:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found