Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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

Replies are listed 'Best First'.
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 <>

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://377289]
choroba mornings back
[Corion]: Hi choroba!
[Corion]: And Discipulus!
Corion arrived back from London. Always nice to meet people again, even if it's just once per year.
[Corion]: Also, dk contributed some cool stuff to App::ShaderToy, like menu settings and real fullscreen, eliminating many of my #TO-DO comments ;)
[Corion]: I hope you spent the four days well without me online ;-D
[Discipulus]: more or less Corion: the monastery was so calm, maybe too much! i feared you'v lost in VR
[Discipulus]: choroba can i ask why you used *DATA{IO}?

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2016-12-06 08:23 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (101 votes). Check out past polls.