in reply to use of "use X"
use warnings;
is short for
BEGIN { require warnings; import warnings; }
so you could do
BEGIN { my $debug = 1; if ($debug) { require warnings; import warnings; } }
The if module attempts to clean that up:
my $debug; BEGIN { $debug = 1; } use if $debug, 'warnings';
|
---|
In Section
Seekers of Perl Wisdom