Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: debugging /logging help

by marius (Hermit)
on Dec 07, 2000 at 00:56 UTC ( #45315=note: print w/ replies, xml ) Need Help??


in reply to Re: debugging /logging help
in thread debugging /logging help

why not check your if $verbose value within your subroutine? That way you spend less time sprinkling "if $verbose" throughout your program.. Granted, my method is slightly less effecient, but you could change your sub to:

sub debug_info { return(0) unless $verbose; print join ':', "\n*", @_; print "\n"; return 1; }


-marius


Comment on Re: Re: debugging /logging help
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2014-12-18 07:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (44 votes), past polls