Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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

by merlyn (Sage)
on Nov 04, 2003 at 13:43 UTC ( #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." :(

    Please post the full URL.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2015-11-29 18:28 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (752 votes), past polls