From: Rich Morin Date: 2006-08-22T11:18:37+09:00 Subject: Re: working around "single-pass" constraint At 11:52 PM +0900 8/21/06, ara.t.howard@noaa.gov wrote: > Main.new(ENV, ARGV).run if $0 == __FILE__ > > the reason is that it allows your program to be used as a > library without polluting the global namespace. Assuming that my code contains generally useful functions, this makes sense (and why bet the other way? :-). However, I'm curious whether I need to worry about the possibility of bringing in multiple "Main" classes and "run" methods, if I use this approach a lot. Do you have any relevant experience to offer? -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development