A simple idea: a single pragma to switch between development and production code behaviour.
use dev; # turns on strict, warnings, diagnostics use dev 'LOGLEVEL' => 1; # turns on logging preset use dev 'WARNFATAL' => 1; # warnings cause death use dev 'ONFATAL' => sub { ... }; # callbacks no dev; # for stable production code
Using dev would make it simpler to turn on and off things you might want in development code, but not in production code. Also, it might encourage standardization on certain logging tools and exception handling mechanisms.
In reply to RFC: pragma 'use dev;' by rvosa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |