Vadim wrote: > > 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. > > Don't you think this is very convenient and it is worth > moving to 'Tcl' object?
I'm not sure it's needed there. Tcl::Tk's internal use is to have various entry points that require a certain package (like Tix), but not have the extra overhead of calling through to Tcl each time. If the Tcl module were to rely on extra Tcl extensions for functionality, then it would make sense (or perhaps if other users fo the Tcl module, like Tkx, wanted this). > I.e we'll move Tcl::Tk::AUTOLOAD sub, which processes this, > into Tcl::AUTOLOAD, and then not only Tcl::Tk interpreter but > any Tcl interpreter will be able to, say, > > $int->setFoo(5); > $int->incrFoo; > print $int->GetVar('foo'); # 6 > > ? Ah, to have the camel-casing feature in the Tcl module? I don't think we'd want to encourage that at this level. For example, one difference between Tcl::Tk and Tkx is that the above works for Tcl::Tk, but Tkx uses $int->set_foo(5); $int->incr_foo; IOW, _ instead of camel-casing. Jeff