|laziness, impatience, and hubris|
First, the functions, SetAttributes and GetAttributes, must be specifically requested:
That would not actually make any difference here. The only difference it would make is allowing this syntax:
Instead of this:
...which is not being attempted here. That specification just tells import() what to bring into the current package namespace from the module.
The issue in play here is the 'eval', which gives the compiler no idea what will be available at runtime. So it fails at compile time. In your 'fixed' example, it's working not because of your added imports, its working because you removed the 'eval'.
In reply to Re^2: including modules during runtime and dealing with OS specific (constants) code block