Get available clojure namespaces -


Is there an idiomatic way to use available namespaces?

(All-N) Uses already used namespaces (package / getPackages) import >, but only those closure namespaces that are already being used.

Then I stumbled, but it uses some classpath magic.

So I want to get something like ('clojure.core' closure .set ... 'close' .contrab.aculator 'close'. Contrib.condition ...) If I have Closer.jar and contrib.jar on the class, but I have not used anything yet.

You have to do "classpath magic". Since there is no type of registry, you have to walk a classpath and to find out what namespace is available, each closure must be displayed in the source file. (If files are not compiled by AOT, otherwise you will need a different estimate.)

I think the best way to use in linked post is to: clojure.contrib search -name / search-namespace-on-class path .


Closer 1.3.0; Now use

with clojure.tools.namespace.find / find-namespaces and clojure.java.classpath / classpath

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -