Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
P is for Practical
 
PerlMonks  

Re^2: debug statements

by djp (Hermit)
on Oct 03, 2006 at 23:43 UTC ( [id://576242]=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: debug statements
in thread debug statements

Source filters are only evil if you invoke them, the beauty of smart comments is that normally they're just comments. Just leave 'use Smart::Comments' out of your code, then to invoke the smart comments (and the source filter), invoke your script via:
perl -MSmart::Comments myscript.pl
or for finer control:
perl -MSmart::Comments='####' myscript.pl
See Smart::Comments for details. This way you have zero overhead except when debugging. I'm surprised this simple technique isn't mentioned in the documentation.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://576242]
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.