Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Code Maintainability

by jkva (Chaplain)
on Dec 05, 2008 at 07:35 UTC ( #728210=note: print w/replies, xml ) Need Help??


in reply to Code Maintainability

Very nice meditation!

Since I noticed some discuss their debug flag techniques, I tend to do either

my $DEBUG = 1; $DEBUG && print 'debugging mode';

or

my $DEBUG = 1; $DEBUG && do { print 'isn\'t'; print 'that something' }

in case of blocks.

Having $DEBUG in the start of the line immediately tells you there's debug related code coming through.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://728210]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2016-12-08 16:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (144 votes). Check out past polls.