Sujet : Re: Differing namespace behavior in Tcl 9.0b2
De : avl (at) *nospam* logic.at (Andreas Leitgeb)
Groupes : comp.lang.tclDate : 17. Jul 2024, 09:04:13
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <slrnv9eunt.1l9n7.avl@logic.at>
References : 1
User-Agent : slrn/1.0.3 (Linux)
Andrew Mangogna <
amangogna@modelrealization.com> wrote:
I have been out of the Tcl loop for a while, but have been porting an old
"C" based extension of mine to Tcl 9.0b2. The port went well, required
very few changes, but I have some differing behavior that I'm trying to
track down. The package consists of an ensemble command, "ral" which
has three subcommands implemented in the "::ral" namespace. Each of
the subcommands is also exported from the namespace. The following shows
the problems:
The behaviour looks buggy to me, but without knowing what
your package ral really does, it's hard to judge.
The only commonly known change w.r.t. namespaces in Tcl9 is
that change about variable lookup (already mentioned in other
replies).
Could you try to reproduce it with a simple package, that
exhibits the same difference 8.6 vs 9.0 ?
% namespace export
tuple relation relvar <- unexpected -- ral exports these commands
<- but they shouldn't appear in the global
<- namespace
Maybe your code does an export on these commands, but only in Tcl9 it
effectively does the "export" from global namespace...
That *might* be a Tcl9 bug, but it would be very interesting how
that is triggered.
Btw., a command does not need to exist in a particular namespace to
be "export"-able from there.