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