I've spent some time trying to get the 'package require' command to
work on my aolserver here and finaly got it to work.  (Then I searched
the on-line archive and found out I could have saved myself some time
had I looked there first).

However, I still have a few comments and questions about this issues
that I haven't yet seen answerd.

Typically a program that has a tcl interpreter imbeded in it calls the
Tcl_Init command on an interpreter after it is created with the
Tcl_CreateInterp command.  Tcl_Init takes care of finding the global
tcl initilization file and sourcing it (typically something like
foo/lib/tcl8.3/init.tcl).  This init script, among other things, takes
care of loading the package.tcl file.

I've greped arround the source tree and it looks like we never call
Tcl_Init.  Why is this?  (I'm not saying we should - I just want to
know why we don't).  Was it just overlooked?  Were there security
concerns?  Did it just not work under the aolserver environment?

Second, I've seen the posts that say you can source the init.tcl file
yourself from the modules/tcl/init.tcl files.  This works for me, but
I'm worried about possible unforseen side effects.  Have those who
have been doing this had any problems?  Could sourcing this file cause
any security issues? etc.

Also, I've notice that you can source package.tcl instead of init.tcl
and the package require stuff still seems to work - is there any
merrit to doing it this way (assuming that, for some reason I don't
know of, it is bad to source the init.tcl file)?

Thanks,
Matthew

Reply via email to