On Apr 17, 2006, at 23:33, Will Coleda wrote:
Not sure if this is a bug or a misunderstanding on my part wrt the
current namespace situation.
I expect this to print out the number 3.14. (This is a very pared down
version of what Tcl in my sandbox is currently trying to do, going
between 'Tcl' and '_Tcl'.
$ cat foo.pir
.HLL 'cromulent', ''
$ cat bar.pir
.HLL 'eek', ''
.sub foo :load :anon
The problem here is the ':anon' sub. It doesn't have a name, so it
isn't stored in any namespace. Now executing this sub doesn't set the
default namespace to 'eek' either. Therefore the symbol '$whee' ends up
in the default namespace of the caller.
After getting rid of :anon the code works as expected.
leo