Re: TIP #189: Tcl Modules
From: Joe English (not.posting.my.email.address.to.usenet_at_any.more.sorry)
Date: 30 Apr 2004 15:49:03 GMT
Steve Cassidy wrote:
>So, concern #1 is that the TIP unneccesarily constrains module formats
>to single files.
Not really. It just says that the _code required to
load a package__ must be in a single, [source]able file.
That could be the module itself (in the case of a single-file
pure-Tcl extension), a collection of scripts concatenated
together (in the case of a multi-file Tcl extension),
or a starkit-like bundle that mounts itself and [load]s
binary parts from inside the VFS.
But it could also be a script that does something like:
set foo_library [file root [info script]]
load [file join $foo_library libfoo[info sharedlibextension]]
source [filejoin $foo_library foo_init.tcl]
This approach makes deployment a tiny bit more difficult --
end users have to extract an archive instead of just
copying a single file -- but nothing in TIP #189 rules
this out. (TIP #190 doesn't mention or encourage this
approach, but #190 isn't normative.)
>My other concern follows from this, modules have no formal way of
>including documentation, code examples, tests or any other auxilliary
That's out of scope for this series of TIPs.
TIP #55 is the right place to address these issues.
(See Kevin Kenny's earlier comments on TIP scope creep).