Tcl Source Code

View Ticket
Login
Ticket UUID: 219375
Title: Add local initialization script for Tcl.
Type: RFE Created on: 2000-10-26 05:11:49
Submitter: nobody Assigned to: dgp
Subsystem: 38. Init - Library - Autoload Severity:
Priority: 6 Last modified: 2002-04-13 02:40:27
Status: Open Closed by:
Resolution: None Closed on:
Version: obsolete: 8.4a3
Description:
OriginalBugID: 5998 RFE
Version: 8.1.1
SubmitDate: '2000-07-10'
LastModified: '2000-10-25'
Severity: LOW
Status: UnAssn
Submitter: techsupp
OS: BSD
OSVersion: BSD/OS 4.0.1
Machine: x86 pc architecture
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'


Name:

Robert Hare


Extensions:

BerkeleyDB.3.0,  mpexpr1.0


DesiredBehavior:

It would be nice to have the following code added to the init.tcl script:

     # Perform any local initialization.

     if {[file exists [file join [info library] init-local.tcl]]} {

          source [file join [info library] init-local.tcl]

     }


This allows customized local initializations to be performed.  In our case we want to add entries

to the default auto_path so that packages we have installed can be found without having to

tweak on the auto_path in every program.


Patch:

--- init.tcl.orig       Tue Jun 15 08:28:19 1999

+++ init.tcl    Fri Jul  7 11:10:00 2000

@@ -570,3 +570,9 @@

 }


 }

+

+

+# Perform any local initialization.

+if {[file exists [file join [info library] init-local.tcl]]} {

+    source [file join [info library] init-local.tcl]

+}


PatchFiles:

init.tcl
User Comments:
dkf added on 2001-01-25 17:10:38:
I like this idea, though I'm not too sure what the best location for such an initialization script is (apart from probably being platform-dependent.)  What do other systems that have to deal with this problem do?

dgp added on 2001-01-26 03:58:20:
Back when this was first proposed, it spawned a thread
on comp.lang.tcl.  See

http://deja.com/=dnc/viewthread.xp?AN=646185059

dkf added on 2001-01-26 16:54:51:
Might I recommend particularly the following message from that thread:
http://www.deja.com/getdoc.xp?AN=645101031

dgp added on 2001-02-01 01:19:26:
Registered patch as #103526

dgp added on 2001-07-22 01:58:36:
Logged In: YES 
user_id=80530

The referenced c.l.t thread is now available at:

http://groups.google.com/groups?hl=en&safe=off&th=e11c0f97f99942,7&seekm=8kckfn%247jg%241%40bob.news.rcn.net

I'm not sure which message Donal wanted to point to in
particular.

dgp added on 2002-04-12 22:24:06:
Logged In: YES 
user_id=80530

Kevin Kenny notes in the Tcl'ers chat that a
site-initialization script like this one would
be the place for sysadmins to set the default
locale for the Tcl library for their systems.

More important as most localization stuff gets
put into Tcl.

hobbs added on 2002-04-13 02:40:27:
Logged In: YES 
user_id=72656

For Kevin's case, 8.4 (which uses nl_langinfo) should be 
much better already at guessing locales, but I still think 
there is value in have such a facility available to 
sysadmins.