~ubuntu-branches/ubuntu/utopic/critcl/utopic

« back to all changes in this revision

Viewing changes to doc/include/api_meta.inc

  • Committer: Package Import Robot
  • Author(s): Andrew Shadura
  • Date: 2013-05-11 00:08:06 UTC
  • Revision ID: package-import@ubuntu.com-20130511000806-7hq1zc3fnn0gat79
Tags: upstream-3.1.9
ImportĀ upstreamĀ versionĀ 3.1.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
Newly introduced with critcl version 3 is support for TEApot
 
3
meta-data.
 
4
 
 
5
[para] While, from the package developer's perspective, some meta data
 
6
support was already present in critcl v2, through the command
 
7
 
 
8
[cmd ::critcl::license], this was only used to generate and place a
 
9
file [file license.txt] into the built package.
 
10
 
 
11
[para] Now critcl supports the declaration of arbitrary meta data,
 
12
which will be placed into a file [file teapot.txt] in a format
 
13
suitable for use by the
 
14
[uri {http://docs.activestate.com/activetcl/8.5/tpm/toc.html} {TEApot tools}].
 
15
 
 
16
 
 
17
[list_begin definitions]
 
18
[comment ---------------------------------------------------------------------]
 
19
[call [cmd ::critcl::license] [arg author] [opt [arg text]...]]
 
20
 
 
21
This command provides information about the author of the package, and
 
22
its license.
 
23
 
 
24
[para] If no [arg text] is present the command expects to find a file
 
25
[file license.terms] in the same directory as the [file .critcl] file
 
26
and reads the license from that. Otherwise the license is the joined
 
27
[arg text]s.
 
28
 
 
29
[para] This information, the license, is ignored in mode "compile &
 
30
run", only mode "generate package" uses it. In that case the
 
31
information is written to a file [file license.terms], a sibling to
 
32
the [file pkgIndex.tcl] file in the directory hierarchy of the
 
33
generated package.
 
34
 
 
35
[para] This information is additionally placed into the meta data file
 
36
[file teapot.txt], under the keys [term as::author] and [term license].
 
37
 
 
38
[para] The data specified by this command has priority over any
 
39
information specified through the generic API [cmd ::critcl::meta].
 
40
 
 
41
[comment ---------------------------------------------------------------------]
 
42
[call [cmd ::critcl::summary] [arg text]]
 
43
 
 
44
Declares a short (one line is recommended) description of the package.
 
45
 
 
46
[para] This information is ignored in mode "compile & run", only mode
 
47
"generate package" uses it. In that case the information is placed
 
48
into the meta data file [file teapot.txt], under the key [term summary].
 
49
 
 
50
[para] The data specified by this command has priority over any
 
51
information specified through the generic API [cmd ::critcl::meta].
 
52
 
 
53
[comment ---------------------------------------------------------------------]
 
54
[call [cmd ::critcl::description] [arg text]]
 
55
 
 
56
Declares a longer description of the package.
 
57
 
 
58
[para] This information is ignored in mode "compile & run", only mode
 
59
"generate package" uses it. In that case the information is placed
 
60
into the meta data file [file teapot.txt], under the key [term description].
 
61
 
 
62
[para] The data specified by this command has priority over any
 
63
information specified through the generic API [cmd ::critcl::meta].
 
64
 
 
65
[comment ---------------------------------------------------------------------]
 
66
[call [cmd ::critcl::subject] [opt [arg key]...]]
 
67
 
 
68
Declares one or more keywords and key-phrases describing the package,
 
69
for an index.
 
70
 
 
71
[para] Multiple calls of this command accumulate keywords and phrases.
 
72
 
 
73
[para] This information is ignored in mode "compile & run", only mode
 
74
"generate package" uses it. In that case the information is placed
 
75
into the meta data file [file teapot.txt], under the key [term subject].
 
76
 
 
77
[para] The data specified by this command has priority over any
 
78
information specified through the generic API [cmd ::critcl::meta].
 
79
 
 
80
[comment ---------------------------------------------------------------------]
 
81
[call [cmd ::critcl::meta] [arg key] [opt [arg word]...]]
 
82
 
 
83
This command is for the declaration of arbitrary meta data outside of
 
84
the reserved keys
 
85
 
 
86
[term as::author],
 
87
[term as::build::date],
 
88
[term description],
 
89
[term license],
 
90
[term name],
 
91
[term platform],
 
92
[term require]
 
93
[term subject],
 
94
[term summary], and
 
95
[term version],
 
96
 
 
97
Its behaviour is like [cmd ::critcl::subject], in that it treats all
 
98
keys as list of words, with each call declaring one or more words for
 
99
the key, and multiple calls extending the data for an existing key, if
 
100
not reserved.
 
101
 
 
102
[para] While it is possible to declare information for one of the
 
103
reserved keys with this command such data is ignored when the final
 
104
meta data is assembled and written.
 
105
 
 
106
[para] Use the commands
 
107
[cmd ::critcl::license],
 
108
[cmd ::critcl::summary],
 
109
[cmd ::critcl::description]
 
110
[cmd ::critcl::subject],
 
111
[cmd {package require}], and
 
112
[cmd {package provide}]
 
113
to declare data for the reserved keys.
 
114
 
 
115
[para] The information for the reserved keys
 
116
 
 
117
[term as::build::date] and
 
118
[term platform]
 
119
 
 
120
is automatically generated by [package critcl] itself.
 
121
 
 
122
[comment ---------------------------------------------------------------------]
 
123
[call [cmd ::critcl::meta?] [arg key]]
 
124
 
 
125
This command enables the retrieval of meta data information from with
 
126
the code defining a critcl based package. Given the [arg key] the
 
127
associated value is returned as the result of the command.
 
128
 
 
129
[para] The envisioned main use is the retrieval of the package's name
 
130
from within utility packages having to adapt C code templates to their
 
131
environment. An example of a package using this command for exactly
 
132
this purpose is [package critcl::class].
 
133
 
 
134
[comment ---------------------------------------------------------------------]
 
135
[call [cmd ::critcl::buildrequirement] [arg script]]
 
136
 
 
137
This command provides control over the capturing of dependencies
 
138
declared via [cmd {package require}]. It runs the script, and any
 
139
dependencies declared within are ignored, i.e. not recorded in the
 
140
meta data.
 
141
 
 
142
[list_end]