Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: inlined DEBUG constant versus $DEBUG

by bluto (Curate)
on Sep 20, 2001 at 05:00 UTC ( [id://113508]=note: print w/replies, xml ) Need Help??


in reply to inlined DEBUG constant versus $DEBUG

I usually end up using the variable rather than the constant since it's very easy to alter this using a command line option (e.g. the ubiquitous '-d'). I hate to edit code to get additional diagnostics printed out for a program that is giving me problems (esp. on a production machine). If the program is large and I have a good logging mechanizm built in, then a constant is usually fine though.

Just curious, does anyone know if there is an easy, clean way of doing this with 'use constant'?

bluto

  • Comment on Re: inlined DEBUG constant versus $DEBUG

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2025-06-13 10:45 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.