in reply to Re^2: Hitting head against wall over Readonly compilation errors
in thread Hitting head against wall over Readonly compilation errors

Is the Readonly module forcing the variables into the global space? Surely that would be something terrible.

There is no such thing. main:: could be considered the root namespace, but it's no more or less global than any other namespaces.

Furthermore, Readonly doesn't move or create variables. It simply alters the variable you pass to it to make it readonly. If you pass it a variable in the main:: namespace, it'll affect a variable in the main:: namespace. If you pass it a variable in the Foo::Bar:: namespace, it'll affect a variable in the Foo::Bar:: namespace. It you pass it a lexical variable, it'll affect the lexical variable.

Replies are listed 'Best First'.
Re^4: Hitting head against wall over Readonly compilation errors
by SilasTheMonk (Chaplain) on Sep 13, 2009 at 09:40 UTC
    Yes I understand what is going on now. Thanks to everyone for educating me in what "our" means. I really had not quite grasped it.