Undocumented, but fairly important, is the need to call ::ncgi::header (or ::ncgi::redirect) after ::ncgi::setCookie, else the cookie does not set. Jan. 13, 2010
#!/usr/bin/env tclsh8.4 package require ncgi ::ncgi::setCookie -name test -value THisIsAGoodCookie -domain yourdomain.com -expires "july 20, 2010" -path / #NOTE: Must use ncgi::header else cookie never sets. #ALSO: The following two are similar, but not the same. #puts "Content-Type: text/plain\n" ::ncgi::header puts "cookie: [::ncgi::cookie test]"
recently on comp.lang.tcl, aku mentioned that ncgi came about by starting with Don Libes' cgi.tcl and breaking the code into namespaces and 3 modules.Related modules in tcllib are