Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I require many sub-namespaces in clojure?

My namespace currently begins:

(ns web.site
  (:require ring.adapter.jetty)

  (:require ring.middleware.reload)
  (:require ring.middleware.stacktrace)
  (:require ring.middleware.params)
  (:require ring.middleware.keyword-params)
  (:require ring.middleware.nested-params)
  (:require ring.middleware.multipart-params)
  (:require ring.middleware.cookies)
  (:require ring.middleware.session)
  (:require ring.middleware.session.cookie)
  (:require ring.middleware.flash)
  (:require ring.middleware.resource)
  (:require ring.middleware.file-info))

There is obviously a certain redundancy here. How to remove it?

like image 698
John Lawrence Aspden Avatar asked Feb 03 '13 20:02

John Lawrence Aspden


Video Answer


1 Answers

Try

(:require [ring.middleware reload stacktrace params keyword-params]) 
like image 85
Mikita Belahlazau Avatar answered Nov 02 '22 14:11

Mikita Belahlazau