Conceptually you still have a '.' operator that causes the value to be constant. It's just that it's implied by the import for all its imported identifiers - an import is nothing more than a convenience to avoid writing "Whatever." in front of all the identifiers.
/ Martin Stjernholm, Roxen IS
Previous text:
2004-02-02 22:18: Subject: Re: Pike module initialization at compile time
Well, it's a bit misleading to say that module variables are generally assumed to be constants at compile time. They are variables, but the '.' operator is evaluated at compile time, so anything indexed through it becomes a constant value.
Well, "int x" in a module is ok to use as a constant value,
-- test.pmod: int x=17; ... import test; constant bar=x;
is totally ok. So they *are* seen as constants.
No, it's enough to index the module with '->' instead.
Ah, interesting. I didn't know that.
/ Mirar