248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
-
+
-
-
+
-
-
+
+
-
+
+
|
append res "$p:$ln: unsafe \"wapp-subst\" call: \"[string trim $x]\"\n"
}
}
}
return $res
}
# Applications under development can invoke this routine to cause the
# Return a string that descripts the current environment. Applications
# environment for the current request to be written to standard output,
# as a debugging aid. This routine has no place in a production
# might find this useful for debugging.
# application
#
proc wapp-debug-puts-env {} {
proc wapp-debug-env {} {
global wapp
set out {}
foreach var [lsort [dict keys $wapp]] {
if {[string index $var 0]=="."} continue
puts "$var = [list [dict get $wapp $var]]"
append out "$var = [list [dict get $wapp $var]]\n"
}
return $out
}
# Start up the wapp framework. Parameters are a list passed as the
# single argument.
#
# -server $PORT Listen for HTTP requests on this TCP port $PORT
#
|