Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^2: debug statements

by djp (Hermit)
on Oct 04, 2006 at 03:43 UTC ( [id://576242]=note: print w/replies, xml ) Need Help??

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
or for finer control:
perl -MSmart::Comments='####'
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?

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-07-25 01:12 GMT
Find Nodes?
    Voting Booth?

    No recent polls found

    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.