On 8/10/07, Vlad Seryakov <[EMAIL PROTECTED]> wrote: > > section "fastpath" { > cache false > cachemaxsize 5120000 > cachemaxentry 512000 > mmap false > }
One problem with this is you can't add comments: section fastpath { cache false ;# Turn off caching ... } With the recursive version, you can't add full line comments to sections. You could switch to a real parser, but then you loose the simplicity of using pure Tcl, which is kind of the appeal. On 8/10/07, Brett Schwarz <[EMAIL PROTECTED]> wrote: > > namespace eval fastpath { > set cache false > set cachemaxsize 5120000 > set cachemaxentry 512000 > set mmap false > } This solves the problem of comments by making the body eval'able and using the set command. But it breaks duplicate values: ns_section "ns/server/${servername}/adp" ns_param map "/*.adp" ns_param map "/*.u_adp" ns_param map "/*.gb_adp" ns_param map "/*.sjis_adp" On 8/10/07, Jeff Rogers <[EMAIL PROTECTED]> wrote: > > I like the general look and that it can be implemented in pure tcl > (heck, even by just sourcing the implementation at the top of your > current config). I think this nails it. The benefit of the Tcl config file is that you make it do whatever you want. In this case, with 5 lines of code. Isn't this validation that the current scheme is working well and this is all that's needed? I've started a new wiki page to gather config file tricks 'n tips: http://naviserver.sourceforge.net/wiki/index.php/Tcl_Configuration_File (btw. I updated the wiki software and SF updated their servers. Seems pretty responsive.) ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel