Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: inlined DEBUG constant versus $DEBUG

by mugwumpjism (Hermit)
on Sep 19, 2001 at 19:09 UTC ( [id://113359]=note: print w/replies, xml ) Need Help??


in reply to inlined DEBUG constant versus $DEBUG

Here's an idea:

sub say { print "$_[0]\n"; } sub moan { print STDERR "WARNING: $_[0]\n"; } sub mutter { print "debug: $_[0]\n"; } if (!$DEBUG) { eval "sub mutter { }"; }

Then the code reads well too :-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2025-06-22 17:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.