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

Re^2: I usually debug via...

by Anonymous Monk
on Feb 21, 2005 at 22:21 UTC ( #433179=note: print w/ replies, xml ) Need Help??


in reply to Re: I usually debug via...
in thread I usually debug via...

Gotta question re: unit tests. In C or C++, I'd do something like this in a foo.c/foo.cpp file:

#define FOO_UNIT_TEST
(various functions or objects... )
#ifdef FOO_UNIT_TEST
int main (int argc, char ** argv) {
(code that tests the above )
#endif
--then I'd just compile the one file when testing, or comment out the first line when integrating.

Is there a similar mechanism for Perl?


Comment on Re^2: I usually debug via...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (13)
As of 2014-04-17 13:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (447 votes), past polls