Here's an approach that might work...
; app1.clj
(ns app1)
(defn myinc[x] (inc x))
(defn mydec[x] (dec x))
(defn .)
;app2.clj
(ns app2)
(defn mysq[x] (* x x))
then you have a mylib.clj which is your public "user" module;
(ns mylib)
(require 'app1 'app2)
(defn exports[]
(refer 'app1 :only
If you intern all the ns-public variable of a namespace, they will be
reexoprted?
Will there be an indirection at runtime or the JVM can sort that out?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googl
Hi Nicolas,
I've done a bit of manipulation of namespaces for dynamic loading and
executing of functions in a web app context which might give you some
ideas...
Here ns-nm and ipath have been extracted from a url. Then...
(let [ .
ipath (if (or (nil? ipath) (= ipath "")) "root" ipath)
ip
That helps a lot. Thank you very much.
That is not very nice though. I quite would like a :reexport option to use.
Best,
Nicolas.
On Wed, Aug 18, 2010 at 11:17 AM, Meikel Brandmeyer wrote:
> There is no standard way of doing that. There is immigrate of an old
> Compojure version, which is a h
Hi,
On 18 Aug., 11:49, Nicolas Oury wrote:
> I have a library of multiple namespaces( a b c) that I want to include
> in one namespace lib, so user of
> the library can only use/require lib and have access to all the
> functions i a, b and c.
>
> What is the standard way to do that?
There is no
Dear all,
I have a simple problem I can't manage to solve.
I have a library of multiple namespaces( a b c) that I want to include
in one namespace lib, so user of
the library can only use/require lib and have access to all the
functions i a, b and c.
What is the standard way to do that?
Best,