Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Conditional Interpretation?

by blazar (Canon)
on Feb 01, 2006 at 11:53 UTC ( [id://527034]=note: print w/replies, xml ) Need Help??


in reply to Conditional Interpretation?

In addition to the other suggestions that have already been given to you, it is worth mentioning that you would better provide a per-module conditional debugging facility. You may want to activate it like

use My::Module DEBUG => 1;

or more easily from the implementation POV:

use My::Module; # ... $My::Module::DEBUG = 1;

If you're concerned that for every debugging info there will be a condition to be checked, for the most critical cases you may write two versions of a sub: one for regular use and one for debugging and call them dereferencing a coderef to the appropriate one assigned to a variable, or perhaps, if you really need to, you may mangle the symbol table. But please do that only if you know what you're doing

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2024-04-25 06:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found