Don't work with the yucky properties API, just install a map of  
properties for the duration of a block!

-----------------------------------------------------
clojure.contrib.java-utils/with-system-properties
([settings & body])
Macro
  setting => property-name value

  Sets the system properties to the supplied values, executes the  
body, and
  sets the properties back to their original values. Values of nil are
  translated to a clearing of the property.
-----------------------------------------------------

CREDITS:

This function is a refactoring of Shawn Hoover's with-properties.  
Shawn, if my changes offend in any way let me know and I will fix it.

NOTES:

(1) You will need to build contrib from source to see this.

(2) Name changed from "with-properties" to "with-system-properties"

(3) Expected argument is now a map, not a vector, which I believe is  
more logical and convenient for callers.

(4) Uses the-str so that property keys can be Clojure keywords or  
symbols.

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