in reply to Re: Is this safe to export and import functions this way? (:all)
in thread Is this safe to export and import functions this way?

Ah, the trick is that the 'use' line becomes:

BEGIN { require My::Package; My::Package->import( keys %My::Package:: ); }

so the 'keys' expression is evaluated after the (generated) 'require My::Package;' is run.

(And I had a typo in my test case.)

- tye        

  • Comment on Re^2: Is this safe to export and import functions this way? (order)
  • Download Code