Hello,

The following works on the 1.1.0 release of both clojure and
clojure.contrib:

$ java -server -Djava.net.preferIPv4Stack=true  -Dpid=30893 -
Djava.awt.headless=true -cp clojure-1.1.0/clojure.jar:clojure-
contrib-1.1.0/clojure-contrib.jar clojure.main
Clojure 1.1.0
user=> (use 'clojure.contrib.sql)
nil
user=> (binding [clojure.contrib.sql/do-commands #(prn %)
          clojure.contrib.sql/do-prepared #(prn %1 %2)]
          (do-commands "bla"))
"bla"
nil


But on the master branches I get:

$ java -server -Djava.net.preferIPv4Stack=true  -Dpid=30893 -
Djava.awt.headless=true -cp /home/joost/lib/clojure/clojure-1.2.0-
master-SNAPSHOT.jar:/home/joost/lib/clojure-contrib/clojure-
contrib.jar clojure.main
Clojure 1.2.0-master-SNAPSHOT
user=> (use 'clojure.contrib.sql)
nil
user=>  (binding [clojure.contrib.sql/do-commands #(prn %)
          clojure.contrib.sql/do-prepared #(prn %1 %2)]
          (do-commands "bla"))
java.lang.Exception: no current database connection (NO_SOURCE_FILE:0)

It looks like I can't bind do-commands... But this works:

user=> (defn test-me [] (prn "orig"))
#'user/test-me
user=> (binding [test-me #(prn "bound")]  (test-me))
"bound"
nil

I have no idea what's going on.

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to