The :as clause establishes an alias for the entire clj-webdriver.core 
namespace.  The value of :only lists the vars from that namespace that are 
referred into my-proj.core, which you can use without qualification e.g. 
`(attribute …)` will work, but `(start …)` won't.  Both `(cw/attribute …)` and 
`(cw/start …)` will work because of the alias.

- Chas

On Nov 18, 2011, at 4:36 PM, Andrew wrote:

> I'm surprised that I can do the following. Am I wrong about namespaces?
> M-x clojure-jack-in
> at the repl, execute (ns my-proj.core)
> compile my core.clj (see ns snippet below)
> back in the repl, use a function from a library that wasn't included in the 
> :only clause from my core.clj file:
> (ns my-proj.core
>   (:use [clj-webdriver.core :as cw :only (attribute
>                                           exists?
>                                           find-it
>                                           flash)]))
> 
> I thought the :only clause here limits my use of the library to these four 
> functions... But at the repl, I'm able to use cw/start ... 
> 
> -- 
> 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

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