Zoran Vasiljevic wrote:
Why would we need to process that optional argument in the first place?
Lets make the ns_register_filter as:
ns_register_filter when method urlPattern script
The "script" should be completely specified, for example
set arg "whatever thing"
ns_register_filter preauth GET /junk [list myfilter $arg]
During runtime we'd append the WHY so it will be called as
myfilter "whatever thing" preauth
Wouldn't that be better/cleaner altogether? This will not break
any code using no optional args (we never used this arg thing)
and would be much more logical to understand.
Hm?
how will be the call, when
ns_register_filter preauth GET /junk myfilter
is registered? when
myfilter preauth
is called, this would be pretty much comaptible with the aolserver for
the simple cases.
this would as well work with xotcl methods in this case. however, this
would as well be
the case, when WHY is placed before the passed arguments.
the hyperflexible approach would be to use
ns_register_filter preauth GET /junk [list myfilter arg1] arg2 arg3
which calls
myfilter arg1 preauth arg1 arg2
which means, cmd as you suggested, appending optional arguments. this means
ns_register_filter preauth GET /junk myfilter arg2 arg3
will make perfectly nice xotcl argumnt lists. In the simple case, this
ist still
comaptible with aolserver, in the complex cases, one has to do rewrite
the code anyhow.
-gustaf
Zoran
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through
log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
naviserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/naviserver-devel