[Melbourne-pm] module importing

Josh Heumann melbourne.pm at joshheumann.com
Tue May 22 21:34:35 PDT 2007

Hi, all.  After some confusing book- and soul-searching, I come to the
group with a question.  I want to do something like this:

use MyModule env => test;

to tell the module that is being used that it should use the test
database.  What do I need to do to capture that in MyModule?

For extra credit, what if I want to use that information in something
in MyModule that happens in a statement that isn't in a subroutine?

All of my tests seem to indicate that I'm out of luck because the
statement outside of a subroutine gets executed at compile time, while
the use statement gets run at runtime.  I feel like I could cobble
something together, but it would be a hack and just plain wrong.

Thanks for your help.


More information about the Melbourne-pm mailing list