From: Torsten B. <be...@ty...> - 2024-07-24 23:02:26
|
Hi Harald, good point about the safe interps or embedded ones. I can see that at least some commands are not available in safe interps. But the package seems to be loaded nonetheless. I'll have to investigate further but my best bet now is to just document the zipfs subcommands not available either in interp(n) or/and in zipfs(n). A short analysis also reveals that zipfs.c in a comment states 4 subcommands not available (mkimg, mkzip, lmkimg, lmkzip) in safe interps while in fact tclBasic.c also takes away mkkey, mount, mount_data and unmount. Further, looking at the implementation in zipfs.c, all helper commands and variables are created in the ::tcl::zipfs namespace, the ensemble command is created in the global namspace and the package is provided as tcl::zipfs. So the documentation is right but maybe you are also right that it should actually be provided as ::tcl::zipfs instead. By the way, when the fact that the namespace path is absolute (i.e. begins with ::) is important, then a change in process(n) and prefix(n) is also needed as the announce the name of the command as tcl::process and tcl::prefix but the synopsis states ::tcl::process and ::tcl::prefix. Cheers, Torsten > Am 24.07.2024 um 11:08 schrieb Harald Oehlmann <har...@el...>: > > Signierter PGP-Teil > Am 23.07.2024 um 00:22 schrieb Torsten Berg: > > Hi Torsten, > great test and analysis. So many questions. Around 15 tickets may be good for all this.... > > May I give opinions on some points: > > > 1) > > The manual page indicates that you need > > > > package require tcl::zipfs ?1.0? > > > > in order to use zipfs. This does not seem true with Tcl9.0b3 where I can just run the last example of the manual page without that line. Is this line obsolete? > > I think, it is common to have a line like this. > If, by chance, it is already loaded by other means, then you have it for sure. It might be like msgcat, what is always loaded by tk. > If tclsh loads it by default, this may be mentioned. Nevertheless, embeded interpeters may not do so. Also, save interpreters may not. > More questions than answers, sorry. > > For 9.0, I would love to see "::" in front of "tcl": > > package require ::tcl::zipfs ?2.0? > > I hope, others will comment on all points. > > Harald > > |