in reply to [SOLVED]: eval in perl package
Actually, if you want to export later (and not just return the value). Just add your variable as a package variable, and export it in @EXPORT_OK. Then you can either write: use MyModule2 '$ourscalar', or if you want to export it later:
use actually calls import right after require, except it is down at compile time rather than during execution.use MyModule2; #only exports defaults ... #some code MyModule2->import('$ourscalar');
|
|---|