Previous: About Tcl Packages, Up: Writing Tcl code
If you need more than one file, then consider to split the namespace into several sub-namespace.
namespace eval foo {}
proc foo::a_procedure {...} {...}
proc foo::another_procedure {...} {...}
variable foo::a_variable
Instead, encapsulate the namespace contents inside it, as in the following example.
namespace eval foo {
variable a_variable
proc a_procedure {...} {...}
proc another_procedure {...} {...}
} ;# End of namespace foo
In that way, it is very easy to determine the entire contents of a namespace.