in reply to syntax question: conditional 'use' statement?
However, this would not work for warnings since it works during compilation time. Moreover, as a rule of thumb I would recommend to always include both use strict and use warnings in every perl program. Believe it or not, it will catch a lot of errors and typos and reduce the debugging time greatly. Even for the advance programming you can always localize the effect by temporarily switching off both warnings and strict with no warnings and no strict directives.BEGIN { use constant DEBUG => 1; if (DEBUG) { require Data::Dumper; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: syntax question: conditional 'use' statement?
by ikegami (Patriarch) on Sep 19, 2006 at 15:59 UTC |