Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: use of "use X"

by ikegami (Patriarch)
on Jan 18, 2012 at 06:38 UTC ( #948486=note: print w/replies, xml ) Need Help??


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';

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://948486]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (2)
As of 2022-08-09 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?