in reply to Main routines, unit tests, and sugar

I'm not entirely sure how use Devel::Main 'main' is better syntactic sugar than calling main()... though I object to the main() rather than an executable body in the first place.

It seems like your main concern with just having your 'main' be the body of the script is the risk of conflicting variable names in different scopes causing readability or debugging issues. The easy way around this is to either:

I suggest that if your scripts are large enough for this sort of confusion to be likely, you're probably best abstracting bits of it away into modules anyhow.

Ramblings and references
“A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort.” Herm Albright
I haven't found a problem yet that can't be solved by a well-placed trebuchet