Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Making debug a little more intelligent

by elusion (Curate)
on Dec 10, 2002 at 23:35 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://218959]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-25 09:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found