Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Making debug a little more intelligent

by elusion (Curate)
on Dec 10, 2002 at 23:35 UTC ( #218959=note: print w/replies, xml ) Need Help??


in reply to Making debug a little more intelligent

Here's what I'd use:
my $debug = 2; sub debug { my ($level, $msg) = @_; return if $level > $debug; print DEBUG "LEVEL $level: $msg"; } debug 2, "foo\n" if something; debug 1, "moo\n" if something;

elusion : http://matt.diephouse.com

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2019-07-20 09:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?