 (ns ring.middleware.cookies
   "Cookie manipulation."
-  (:use [clojure.contrib.def :only (defvar-)]
-        ring.util.codec))
+  (:use [clojure.contrib.def :only (defvar-)])
+  (:require [ring.util.codec :as codec]))
 
 (defvar- re-token #"[!#$%&'*\-+.0-9A-Z\^_`a-z\|~]+"
   "HTTP token: 1*<any CHAR except CTLs or tspecials>. See RFC2068")

  "Turn quoted strings into normal Clojure strings using read-string."
  [cookies]
  (for [[name value] cookies]
    (let [value (url-decode value)]
      (if (.startsWith ^String value "\"")
        [name (read-string value)]
        [name value]))))

(defn- write-value
  "Write the main cookie value."
  [key value]
  (str (name key) "=" (codec/url-encode value)))

(defn- valid-attr?
  "Is the attribute valid?"
