To speed up testing, I've cached/serialized the XQL parsing step by reading the queries from a single big data file (xql.dat), and didn't include this in the distribution. So you can either bypass this and parse XQL each time, or create your own xql file. To bypass, uncomment this line in pnsd-init.tcl:
set LOAD_XQL_FROM_CACHE 0
I'll document creating your own xql cache ASAP, but if you look at the code around LOAD_XQL_FROM_CACHE you should be able to figure it out. Sorry for that.
One other helpful example. This code will load the home page... logging in, checking permissions, compiling the adp template, executing the tcl data source file, and echo'ing the HTML to stdout while generating an execution trace to a separate log file. It will run from TclPro:
source pnsd-init.tcl
::pnsd::source_openacs
set ::pnsd::url /
set ::pnsd::querystring ""
#sign myself in as sysadmin
ad_user_login 2537
rp_filter "Because I said so"
#Trace execution of the handler
package require Tclx; cmdtrace on [open cmd1.log w]
rp_handler
#echo html to stdout
pnsd::write_html
Also, I'm currently working on converting a client's existing ACS 3.x learning management system (LMS) to run on Apache+pnsd+OpenACS 4.x. The licensing of the completed work is being decided right now, with a strong leaning towards GPL. I should have some more good sample code when that porting job wraps up.