• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

READMEH A D02-Nov-20201.5 KiB4030

catch.tclH A D02-Nov-2020756 3312

cookie.tclH A D02-Nov-20203.8 KiB12573

debug.tclH A D02-Nov-20203 KiB9958

html.tclH A D02-Nov-2020650 2910

http_accept.tclH A D02-Nov-20202.9 KiB9454

import_keyvalue_pairs.tclH A D02-Nov-20201.6 KiB5832

import_switch_args.tclH A D02-Nov-20201.1 KiB4328

lempty.tclH A D02-Nov-2020309 196

lmatch.tclH A D02-Nov-20201.5 KiB5334

load_cookies.tclH A D02-Nov-2020573 2712

load_response.tclH A D02-Nov-2020890 3315

parray.tclH A D02-Nov-20201.2 KiB3822

parray_table.tclH A D02-Nov-20201.3 KiB4119

putsnnl.tclH A D02-Nov-20202.4 KiB7652

random.tclH A D02-Nov-2020941 3516

read_file.tclH A D02-Nov-2020371 249

redirect.tclH A D02-Nov-20201.7 KiB6427

rivet_command_document.tclH A D02-Nov-20201.6 KiB5736

tclIndexH A D02-Nov-20202.4 KiB3533

try.tclH A D02-Nov-2020376 219

url_query.tclH A D02-Nov-2020542 2511

wrap.tclH A D02-Nov-20201.6 KiB5530

xml.tclH A D02-Nov-20202.3 KiB10538

README

1###
2## rivet/rivet-tcl - Tcl code for use with the Rivet Apache module.
3##
4## $Id$
5##
6###
7
8This directory contains an individual .tcl file for each proc in Rivet and
9a line in the tclIndex file for each corresponding .tcl file and procedure.
10
11This is done for two major reasons:
12
131) Code is easy to manage.  If you want to edit a procedure, you know right
14   which file to look in.
15
162) No code is loaded needlessly into the interpreters.  Since each command
17   resides in its own .tcl file, and those files are not sourced until the
18   command is needed, there is no loading of superfluous procs or code
19   when a particular command is needed.
20
21So, basically, if you want to add a single command to the Rivet library,
22you can easily do it by adding it as a .tcl file here.  Name the file
23<commandName>.tcl, and then add it to the tclIndex file.  You can either
24do this by hand or by Tcl's built-in functions.  IE:
25
26$ tclsh
27% auto_mkindex . *.tcl
28
29This should produce the desired result.
30
31This is NOT the directory to add packages or entire libraries of code.
32See the rivet/packages/ directory for that.
33
34There is a small trade-off to all of this.  The larger the proc library gets,
35the larger the auto_load array gets, making auto loading procedures take a
36little longer as the functions to load unknown commands have to pull the code
37to load each command from this array.  But, the trade-off is really quite
38nominal.  It will only even be used once, the first time a command is called.
39Once a command is loaded, none of this code is even called.
40