From: Austin Ziegler Date: 2003-12-11T12:36:40+09:00 Subject: Re: Ideas for replacing $0==__FILE__ On Thu, 11 Dec 2003 09:52:17 +0900, Steven Lumos wrote: >> From this perspective, it would be nice to have a mechanism that (1) >> is not enabled by default, and especially (2) is easy to parse out. > Do people really consider this idiom to be *that* useful? Most of the > times I've seen it used, it wraps either examples (better done in > separate files, you can have more than one and more complex), or tests > (*much* better done with Test::Unit). Most of my modules have if $0 == __FILE__ then require 'test/unit' ... end I wouldn't mind replacing this with a block like: TEST { require 'test/unit' ... } -austin -- austin ziegler * austin@halostatue.ca * Toronto, ON, Canada software designer * pragmatic programmer * 2003.12.10 * 22.35.11