Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
go ahead... be a heretic
 
PerlMonks  

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

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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 03: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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://377289]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.