.
D 2002-03-27T13:30:42
J assignee dgp
J cmimetype text/plain
J comment Allow\sthe\s"package\srequire"\scommand\sto\stake\san\s\nargument\sfor\sasserting\scontrol\sover\sthe\splacement\sof\s\nloaded\snamespaces\sthat\sare\sdefined\swith\srelative\snames\s\n(ie.,\snot\sexplicitly\soff\sthe\sroot\snamespace\sas\s\nin\s::MyNamespace).\n\nFor\sexample,\sif\syou\sknow\sthat\sa\sparticular\spackage's\s\nTcl\scode\sis\swritten\sin\sa\snamespace-placement-safe\s\nmanner\s(e.g.,\sthrough\sapplicable\suse\sof\s"namespace\s\ncode",\setc.),\sit\sshould\sbe\spossible\sto\shave\san\s\napplication\sthat\sis\susing\sthat\spackage\splace\sit\s\nwherever\sit\swants\sin\sthe\snamespace\sheirarchy,\sto\savoid\s\nnamespace\scollision\swithout\smodifying\sthe\ssource\scode\s\nof\sthe\spackage.\n\nFor\sexample,\sif\smy\sapplication\suses\stwo\spackages\sthat\s\nboth\swant\sto\sdefine\sthe\snamespace\s"tools",\syour\s\noptions\sare\seither:\n\n1.\sEdit\sthe\ssource\scode\sto\srename\stheir\snamespaces\sto\s\ne.g.\s"contrib1::tools"\sand\s"contrib2::tools"\s\nor\s"tools1"\sand\s"tools2".\n\n2.\sUse\s"namespace\seval\scontrib1\s{\ssource\s\npackage1/tools.tcl"\s(likewise\sfor\spackage\s2),\sinstead\s\nof\sthe\spackage\smechanism.\n\nInstead,\sit\swould\sbe\suseful\sto\suse\sa\scommand\ssuch\sas:\n\npackage\srequire\spackage1\s-in\scontrib1\npackage\srequire\spackage2\s-in\scontrib2\n\nThen,\sif\spackage1\sand\spackage2\sare\sboth\swritten\sto\s\ndefine\sthe\s"tools"\snamespace,\sthey'd\sautomatically\sbe\s\nplaced\swithin\sthe\sdesired\sparent\snamespace.\n\nThe\sfollowing\sdoes\snot\swork...\n\nnamespace\seval\scontrib1\s{\n\s\s\s\spackage\srequire\spackage1\n}\nnamespace\seval\scontrib2\s{\n\s\s\s\spackage\srequire\spackage2\n}\n\n...because\sthrough\spackage\sifneeded\setc.\sthe\sfiles\s\nlisted\sin\spkgIndex.tcl\swill\sbe\ssourced\sin\sthe\sglobal\s\ncontext.\n\nThis\swould\sbe\sparticularly\suseful\sin\scases\swhere\sa\s\npackage\scontains\smultiple\snamespaces,\sor\sin\sre-\npackaging\sa\sset\sof\spackages\sas\sa\ssingle\spackage.\s\sIn\s\nthe\slatter\scase,\ssome\snamespace-like\sheirarchy\sto\s\npackage\snames\smight\salso\sbe\suseful.\n
J foundin None
J priority 5\sMedium
J resolution None
J status Open
J submitter muonics
J subsystem 39.\sPackage\sManager
J title [package]\sctrl\sover\snamespace\splacement
J type RFE
K 535709ffffffffffffffffffffffffffffffffff
U muonics
Z 098b25b77291a710098cd8018e30a0bc