ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> activetcl
activetcl
[Activetcl] Active state, ::safe:: base, and package require
by Nicolas Castagne other posts by this author
Jun 20 2008 8:07AM messages near this date
view in the new Beta List Site
Re: [Activetcl] Can't get remote debugging to work | Re: [Activetcl] Active state, ::safe:: base, and package require
Hi folks,

In the tcl documentation of ::safe:: (safe base), it is said that by
default a safe interpreter created with :
    ::safe::interpCreate
can source, load and "package require" in the auto_path of its master.

Indeed, when using tcl on Linux installed through ActiveState, with tcllib
installed through teacup by :
    teacup install ActiveState::ActiveTcl,

there are many packages in the tcllib that cannot be required from a safe
interp.
EG:
    % package require math::bigfloat
    2.0.1
    % ::safe::interpCreate
    interp0
    % interp eval interp0 "package require math::bigfloat"
    can't find package math::bigfloat
    % interp eval interp0 "package require math::linearalgebra"
    can't find package math::linearalgebra

Indeed, the packages that cannot be loaded are installed in:
/opt/ActiveTcl-8.5/lib/teapot/package/tcl/teapot/tcl8/8.4/

Also, I cannot find any pkgIndex.tcl containing a reference to the
non-safely-requirable packages throughout the activetcl installation.


Questions are:
- why is the master interp able to require these packages ?

- is the problem due to ActiveState architecture?
Or to the ::safe:: mechanism?
Or to a specifity of those packages (eg : math::linearalgebra ,
math::bigfloat, but also many many others) ?
Or to a misunderstanding of my side of the ::safe:: auto_path documentation ?

- how can I work arround these problem so that I can load ?

- or does it mean that none of the packages in tcllib are supposed to be
loaded in a safe interpreter ?

Thanks much !
Nicolas


PS :

I've found also a problem with safe-loading of the package math.
This time, the safe interp is able to locate the package, but cannot load it.
I've reported the issue on the tcllib bugtracker :
https://sourceforge.net/tracker/?func=detail&atid=112883&aid=1998628&group_id=12883

I mention this here in case it would also concern ActiveState. In this
case, I can post a bug report, if needed !
Thx

_______________________________________________
ActiveTcl mailing list
ActiveTcl@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Nicolas Castagne
Andreas Kupries
Nicolas Castagne
Andreas Kupries

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved