Vadim wrote: > Given that pkg_require do not throw an error when package not > found, this leads to a situation when user do not know wht > the error is. > > I suspect this was done so in purpose, so the system will > have chances to autoload package later. (does this makes any sence?) > > However $int->packageRequire('packagename'); will explain if > package not found; > > Is it worth recommending this everywhere?
This is all Tcl::Tk stuff, and pkg_require has a more special purpose internally than external (to the user). Whereas packageRequire is just translated by Tcl::Tk to the Tcl call [package require ...], pkg_require is used internally with a special cache for Tcl::Tk itself. I would saw packageRequire should be recommended for end users, but pkg_require can be used still internally. Jeff Hobbs, The Tcl Guy, http://www.ActiveState.com/