Re: [TDK] InitPrefix meta data usage in tclpe
by Andreas Kupries other posts by this author
Jun 7 2007 10:37AM messages near this date
view in the new Beta List Site
[TDK] InitPrefix meta data usage in tclpe
|
[TDK] teapots created with conflicting versions
I have to apologize. The documentation is wrong. I had to source dive a to
refresh my own memory ...
The heuristic scanner creating a draft teapot.txt from code generates
'InitPrefix' to associate 'load'ed files with a package name to use when
constructing XXX_Init.
I.e. if the scanner picks up a command
load FOO.so
nothing is done. If however the found load command is of the form
load FOO.so XXX
then 'InitPrefix' is generated and maps from FOO.so to XXX so that the
generator can properly recreate this load command. For source'd files this
is obviously nonsense. Note however that you can shoehorn the extended
semantics into the InitPrefix if you add newlines at the beginning of your
codefragments, or semicolons.
I will fix the documentation.
--
Andreas Kupries <andreask@[...].com>
Developer @ http://www.ActiveState.com
Tel: +1 778-786-1122
-----Original Message-----
From: tdk-bounces@[...].com
[mailto:tdk-bounces@[...].com]On Behalf Of Brandt, Joe
Sent: Thursday, June 07, 2007 7:38 AM
To: tdk@[...].com
Subject: [TDK] InitPrefix meta data usage in tclpe
What is the correct usage of the InitPrefix metadata in tclpe? From the
documentation I was assuming InitPrefix <file> <code> <file> <code> .
Here is how I'm adding it "InitPrefix test_utils.tcl test1". In the
generated pkgIndex.tcl file it creates the following which isn't correct on
the source line.
# @@ Meta Begin
# Package test_utils 2.00
# Meta description
# Meta platform tcl
# @@ Meta End
if {![package vsatisfies [package provide Tcl] 8.4]} return
package ifneeded test_utils 2.00 [string map [list @ $dir] {
source [file join {@} test_utils.tcl] test1
# ACTIVESTATE TEAPOT-PKG BEGIN DECLARE
package provide test_utils 2.00
# ACTIVESTATE TEAPOT-PKG END DECLARE
}]
NOTICE: This email message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited. If you
are not the intended recipient, please contact the sender by reply email and
destroy all copies of the original message.
Thread:
Joe Brandt
Andreas Kupries
|