in reply to Re^6: The Boy Scout Rule
in thread The Boy Scout Rule
Whilst not pretty, it is pretty simple and clear.I beg to disagree. I recently implemented new features that needed to exit, but I had to literally experiment with all the possible combinations of exit statuses and AndExits to find the values leading to the expected behaviour. There's no documentation and only the comments shown. I'd think that "and exit" means "exit", not "and exit if not called from the command line and the number of errors is greater than some arbitrary constant plus a global variable whose value changes in 10 more places, good luck".
Otherwise, you're right. The global state is enormously large and contains lots of magical hashrefs as the one shown in Can you use string as a HASH ref while "strict refs" in use?. Also, many subroutines start with a boilerplate of
my ($i,$j,$k,$l,$m,$n); my ($Results,@Results,%Results);
You know, just in case you needed a variable, but couldn't declare one. One or two of them are actually used sometimes, but you never know which ones.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^8: The Boy Scout Rule
by BrowserUk (Patriarch) on Jan 27, 2015 at 20:36 UTC |