Thanks, Sean. I really like that approach. I wasn't even aware of the delay macro. Very cool. So much awesome stuff in Clojure I feel like I'll never learn it all.
On Tuesday, August 14, 2012 8:33:49 PM UTC-5, Sean Corfield wrote: > > On Tue, Aug 14, 2012 at 5:49 PM, Dave Kincaid > <kincai...@gmail.com<javascript:>> > wrote: > > So I'm wondering how others handle this. In one project recently I setup > a > > global map using ^:dynamic and then switched in the appropriate map from > a > > command line argument. This somehow doesn't seem the right way to do it. > Any > > suggestions? Are there some projects out there that would be good > examples > > of this? > > At World Singles, environment control was one of the first things we > switched over to Clojure. > > Essentially we have a map of maps - a map with default settings and > then a map for each environment with overrides - and a settings Var > that is a delay of creating the merged map for the current host (by > looking up the local hostname in the override maps). That's a gross > simplification but it should give you an idea of what we're doing. > > The application just accesses @worldsingles.environment/settings and > it's created on first access and cached for subsequent access (because > of delay). > -- > Sean A Corfield -- (904) 302-SEAN > An Architect's View -- http://corfield.org/ > World Singles, LLC. -- http://worldsingles.com/ > > "Perfection is the enemy of the good." > -- Gustave Flaubert, French realist novelist (1821-1880) > -- 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