Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

•Re: When -w and use strict aren't enough...

by merlyn (Sage)
on Nov 04, 2003 at 13:43 UTC ( [id://304412]=note: print w/replies, xml ) Need Help??


in reply to When -w and use strict aren't enough...

without having to write a test suite that exercises every code branch, which isn't always (or even usually) possible.
Quite the contrary. In a well-maintained system, a test suite that tests every code branch is mandatory. And as they say, "you can pay me now, or you can pay me later" with respect to testing.

Your code should be designed so that testing every branch is possible. If you're writing code that's hard to test, you can't test it, and therefore it's quite possible that some bug will show up in the future. Bad code, Bad code, what you gonna do?

Read Test::Tutorial. Learn how to write tests, and you'll gradually start writing code that can always be tested.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on •Re: When -w and use strict aren't enough...

Replies are listed 'Best First'.
Re: •Re: When -w and use strict aren't enough...
by dda (Friar) on Nov 04, 2003 at 14:26 UTC
    What tutorial you are talking about? I've not found anything on CPAN except "Here should be extensive documentation on what unit testing is, why it is useful, and how to do it with the Test::Unit collection of modules. Sorry for not implementing this yet." :(
    http://search.cpan.org/~aspiers/Test-Unit-0.24/lib/Test/Unit/Tutorial.pm

    Please post the full URL.

    --dda

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-23 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found