http://www.perlmonks.org?node_id=664703


in reply to conditional self-execution

OK -- after reading and re-reading the first sentence of your post, I think I understand the concept.

So what's the point? It just strikes me as a clever piece of code, a solution looking for a problem. It makes more sense to me to just write a module, which is really just a library of related subroutines and variables, and call it from a script, which is just the main-line.

And I'm asking this in the nicest possible way -- I'm not trashing Ruby, just I'm really puzzled as to why one would write something like this.

Alex / talexb / Toronto

"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds