Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: brian's Guide to Solving Any Perl Problem

by ff (Hermit)
on Jul 25, 2004 at 17:55 UTC ( #377289=note: print w/ replies, xml ) Need Help??


in reply to Re^2: brian's Guide to Solving Any Perl Problem
in thread brian's Guide to Solving Any Perl Problem

Of course it's fine to save warn() for "real" error messages, but then the same could be said for only using print() for real output messages.

My problem, for which I'd welcome suggestions, is that I'm not familiar with how to use debug() in the midst of debugging a huge Tk-based application that I'm working on. The subroutines I am debugging get fired when I click one of the Tk buttons, and I know for sure that I can get at my warn() messages as above via my STDERR files. Out of ignorance, I'm just expecting use of debug() to be impractical.


Comment on Re^3: brian's Guide to Solving Any Perl Problem
Re^4: brian's Guide to Solving Any Perl Problem
by brian_d_foy (Abbot) on Jul 26, 2004 at 07:02 UTC
    The debug() function can be whatever you want it to be, because you have to write it.

    The print() loses against warn() because I can redefine the behaviour of warn() without changing the statements.

    --
    brian d foy <bdfoy@cpan.org>

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2014-09-16 05:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (156 votes), past polls