I have this Compojure code that works fine:
(defroutes my-routes (GET "/api" (my-code request))) I want this code to be generated by a macro. My real code is more complex but the error is the same. (defmacro mydefroutes [] `(defroutes my-routes (GET "/api" (my-code request)))) When I run this code, I get the following error: (foo) No such var: webservice/request [Thrown class java.lang.Exception] (webservice is the namespace of my code) When I macroexpand the code I see this: webservice> (macroexpand-1 '(foo)) (compojure/defroutes webservice/my-routes (compojure/GET "/api" (webservice/my-code webservice/request))) I'm not sure what to do here. S. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---