The stupid question is the question not asked | |
PerlMonks |
Re: Main routines, unit tests, and sugarby BrowserUk (Patriarch) |
on Jun 13, 2013 at 05:51 UTC ( [id://1038673]=note: print w/replies, xml ) | Need Help?? |
The problem with that format is that any variable I have in the main routine, like $name above, is in scope for the whole file. If I'd misspelled $name in the argument list to say_hello(), it could have given rise to a hard-to-trace bug. Put your subroutines first, at the top of the file, and the 'main' code at the bottom. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Meditations
|
|