Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-02-09
09:17 • Closed ticket [1032314fff]: namespace inscope regexp in :unknown plus 3 o... artifact: f41aa944e3 user: jenglish
09:17 • Ticket [1032314fff]: 4 changes artifact: 7540c44694 user: jenglish
2007-09-06
04:33 • Ticket [1032314fff]: 4 changes artifact: f9315f4905 user: jenglish
2007-09-05
23:46 • Ticket [1032314fff]: 5 changes artifact: 578b7ea9d7 user: dgp
2004-11-04
04:37 • Ticket [1032314fff]: 4 changes artifact: e47deb1663 user: dgp
2004-09-22
16:34 • Ticket [1032314fff]: 4 changes artifact: 93e58e9df0 user: dkf
03:15 • New ticket [1032314fff]. artifact: afc3f8c02d user: coldstore

namespace inscope regexp in [::unknown]

Closed / Fixed1032314fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 18 years ago
Descriptionplain2004-09-22 03:15:53
In the [::unknown] proc, in init.tcl, there's a regexp
which attempts to match "^:*namespace\[ \t\n\]+inscope".

DGP thinks this is to work around a bug in itcl.  I can
find no Changelog reference to it, but it is clear that
the line predates November 2001.

1) If this is a workaround for itcl, shouldn't it be in
itcl?

2) Even if this needs to be there for tcl, a [string
match] would be faster than a [regexp] ... and surely
the circumstances provoking the problem can narrowed
down to produce a constant?

Can anyone provide more background on this?
dkfplain2004-09-22 16:34:15
Logged In: YES 
user_id=79902

This is one of the crazy aunts in Tcl's attic.
dgpplain2004-11-04 04:37:08
Logged In: YES 
user_id=80530

Itcl test scope-3.7 is related.
dgpplain2007-09-05 23:46:38
Logged In: YES 
user_id=80530
Originator: NO


so did we determine there's
no valid reason to keep this?
jenglishplain2007-09-06 04:33:40
Logged In: YES 
user_id=68433
Originator: NO

It does not need to be there for Tcl.  According to namespace(n), Tcl does not promise that the return value of [namespace code ...] may be used as a command name, only that it may be used as a script or as a script prefix.
jenglishplain2009-02-09 09:17:32
Miguel fixed this a while ago (library/init.tcl r1.108-1.109, 2008-08-06); closing.
jenglish Closed ticket [1032314fff]. [History diff]2009-02-09 09:17:33
Log in (anonymous is fine) to add a comment.