Tk Library Source Code

View Ticket
Login
Ticket UUID: 2038217
Title: the irc package is misusing namespace variables
Type: Bug Version: None
Submitter: nobody Created on: 2008-08-05 01:01:52
Subsystem: irc Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2008-08-06 03:40:37
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2008-08-05 20:40:37
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.
User Comments: andreas_kupries added on 2008-08-06 03:40:37:
Logged In: YES 
user_id=75003
Originator: NO

Committed a fix to the CVS head. Package version 0.6.1.