Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Re: inlined DEBUG constant versus $DEBUG

by derby (Abbot)
on Sep 19, 2001 at 19:14 UTC ( [id://113364]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: inlined DEBUG constant versus $DEBUG
in thread inlined DEBUG constant versus $DEBUG

stefp,

That's why I tend to favor 'n' over 's'. However, when I debug code that contains

sub DEBUG () { 0 }
I still step through the DEBUG subroutine. Which is what I would expect while debugging. Try:

perl -de 'use constant DEBUG =>0; use O qw( Concise -exec); print "toto" if DEBUG; print "toto" if DEBUG'

perl -de 'sub DEBUG() { 0 }; use O qw( Concise -exec); print "toto" if DEBUG; print "toto" if DEBUG'

-derby

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2025-06-13 11:13 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.