http://qs321.pair.com?node_id=569744

dev - pragma for development code

A simple idea: a single pragma to switch between development and production code behaviour.

Synopsis

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

Rationale

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.