| I'm stumped. Could someone explain this for me ? ; I want to set up some redirects defined as data:
(= redirects* '(
(i "http://dest1")
(i/j "http://dest2")
))
; first attempt. This fails to create a handler for the
; i, i/j paths (ie makes no change to srvops*)
(each (path dest) redirects* (defopr path req dest))
; second attempt - maybe I need a macro ? This fails also
(mac defredirect (path dest) `(defopr ,path req ,dest))
(each (path dest) redirects* (defredirect path dest))
; the only way I've found that works: call defopr
; (or defredirect) at top level
(defopr i req "http://dest1")
(defopr i/j req "http://dest2")
|