File: use.html

package info (click to toggle)
libapache-mod-dtcl 0.7.3-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 404 kB
  • ctags: 300
  • sloc: tcl: 1,266; ansic: 1,164; lisp: 563; makefile: 94; sh: 91
file content (125 lines) | stat: -rw-r--r-- 3,884 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">

<!-- $Id: use.html,v 1.6.2.1 1999/12/06 05:26:28 davidw Exp $ -->

<html>
  <head>
    <title>Use and features of mod_dtcl</title>
  </head>
  <body bgcolor="ffffff">
    <bodytext>
      
      <p>
	<b>COMMANDS:</b>
      </p>
      Special mod_dtcl commands<br></br>
      <ul>
	<li><code>buffer_add</code> - add text to output_buffer for
	later printing.  Used internally.</li>
	<li> <code>hputs	<u>?-error?</u></code> - like puts, but to the client instead of stdout.
	  The error option permits you to send an
	  'error message' to the apache log file, at
	  the NOTICE level.
	</li>
	
	<li> <code>hgetvars</code> - get the environmental vars. 
	  This is in a seperate command so as not to make
	  the server do this every time you load a .ttml
	  file.  ENVS and VARS are the two associative
	  arrays loaded.  ENVS contains environmental
	  variables, VARS contains all the 'cgi' variables.
	  Look in the examples.ttml file to see how these
	  work.  
	</li>
	<li><code>include <u>filename</u></code> - include a flat
	  file.  Useful for including HTML files.
	</li>
	<li><code>parse <u>filename</u></code> - include and parse a
	ttml file (although the filename doesn't have to end in
	.ttml).  This creates a subrequest, 'request' (so that you get
	things like ::request::request), where the file is evaluated.
	This command was added as of version 0.6, so it may have a few
	bugs to be ironed out - please report them!
	</li>
	<li><code>hflush</code> - flush the output buffers to the
	  client - allows for incrementally outputting a page
	</li>
	<li>
	  <code>headers setcookie 
	    <u>cookie-name</u>
	    <u>cookie-value</u>
	    <u>?-expires date/time?</u>
	    <u>?-domain domain?</u>
	    <u>?-path path?</u>
	    <u>?-secure?</u>
	  </code> 
	  
	  - allows you to set a cookie with various properties.
	  Cookie-name is the name of the cookie, cookie-value is the
	  data associated with the variable.  Expires sets an
	  expiration date for the cookie, and must be in the format
	  '<b>DD-Mon-YY HH:MM:SS</b>', path sets the path for which
	  the cookie is valid, and secure specifies that the cookie is
	  only to be transmitted if the connection is secure (HTTPS).
	</li>
	<li>
	  <code>
	    headers redirect <u>uri</u>
	  </code> 
	  - Redirect from the current page to a new URI.  Must be done
	  in the first block of TCL code.
	</li>	
	<li>
	  <code>
	    headers set <u>headername</u> <u>value</u> - Set arbitrary
	    headernames and values.
	  </code>
	</li>
	<li>
	  <code>
	    dtcl_info
	  </code>

	  - returns information on the internals of the module.
            Currently, only the PID and size of the object cache are
            reported.
	</li>

      </ul>
      <p>
	<b>
	  FEATURES:
	</b>
      </p>
      <p>	
      <ul>	
	<li>
	  Thanks to the work of Rolf Ade, mod_dtcl now has a companion
	  script, <a href="dtcl-tcl.html">dtcl.tcl</a>, based on Don
	  Libes' <a href="http://expect.nist.gov/cgi.tcl/">cgi.tcl</a>.
	  It includes a lot of 'utility' functions, that are good for
	  generating HTML.  Please be aware that this is still
	  alpha/beta code.	  
	</li>
	<li>
	  Paolo Brutti has contributed code that allows mod_dtcl
	  to cache commonly visited ttml scripts (as well as numerous
	  other fixes and improvements!).
	</li>
	<li>
	  <b>dtcl-mode.el</b> is a an elisp mode that allows you to
	  edit a ttml file, and switch between html and tcl modes,
	  complete with syntax highlighting and indentation!  To use
	  it: "M-x load-file" and then type in dtcl-mode.el, along
	  with the correct path.  Then load your ttml file, and do
	  "M-x dtcl-mode".
	</li>
      </ul>      
    </p>
      <p>
	<a href="index.html">Return to the mod_dtcl homepage</a>
      </p>
      <i>$Id: use.html,v 1.6.2.1 1999/12/06 05:26:28 davidw Exp $</i>
    </bodytext>
  </body>
</html>