|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
strict, warnings and diagnostics pragmasby tomazos (Deacon) |
| on Aug 03, 2001 at 16:54 UTC ( #101956=perlmeditation: print w/ replies, xml ) | Need Help?? |
|
At the beginning of every Perl script you write put:
This will among many good things make sure you declare everything in the right namespace, give you extensive warnings about weird things you write (which 9 times out of 10 will be bugs) and when your script encounters an error (compile-time or run-time) it will dump very useful information about what exactly went wrong. Do not take these pragmas out when your script goes into production unless you expect your script to be very processor intensive or for it to be called very frequently. This is so that the next time you or someone else makes a "small" change to the script, the bugs they have introduced can be caught quickly with the aid of the pragmas (without having to remember to put them back in). Yeah, I know. We've heard it before. :) Now you've heard it again.
Back to
Meditations
|
|
||||||||||||||||||||||||||||||||||||