On Nov 8, 2011, at 8:47 PM, Alan Malloy wrote:
>> (let [ns-obj (the-ns (doto 'clojure.test require))
>>       the-var (intern ns-obj 'old-report)]
>>   (when-not (.hasRoot the-var)
>>     (intern ns-obj 'old-report clojure.test/report)))
>> 
>> Seems to have the same effect as the defonce in some simple testing.
> 
> Of course it's silly to use intern the second time: (.setRoot the-var
> clojure.test/report) would have been simpler. 

Thank you. You've made a user happy.

(You meant .bindRoot rather than .setRoot, right?)


-----
Brian Marick, Artisanal Labrador
Now working at http://path11.com
Contract programming in Ruby and Clojure
Occasional consulting on Agile


-- 
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

Reply via email to