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
In reply to Re^2: Is this safe to export and import functions this way? (order)
by tye
in thread Is this safe to export and import functions this way?
by james28909
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |