| Description: |
The irc package neglects to use [variable] within the namespace eval to get the right scope in proc ::irc::connection.
The following is an example:
% set ::sock "I'm a global value"
I'm a global value
% source ./irc.tcl
% set c [::irc::connection]
::irc::irc0::network
% set ::sock
%
The following namespace variables should be used with [variable]:
sock, dispatch, linedata, config, logger
Right now this totally defeats the purpose of using a namespace.
It also results in this interesting bug if the dispatch global variable exists.
% set dispatch global
% set c [irc::connection]
can't array set "dispatch": variable isn't array
You may want to check the bug tracker for similar bugs from existing globals that the irc package tries to overwrite.
There may be more problems lurking in the irc package.
|