Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re^2: Philosophical question about testing

by doom (Deacon)
on Oct 29, 2010 at 17:36 UTC ( #868367=note: print w/replies, xml ) Need Help??

in reply to Re: Philosophical question about testing
in thread Philosophical question about testing

This is why modules and subs arent talked about much
Modules and subs are talked about all the time by perl programmers who have half a clue about what they're doing.

If you push a block of code off into a sub inside a module, among other things you'll discover that it's much easier to write tests for it, and once you've got tests for it, it's much easier to re-write it as you describe (though reducing line count is hardly ever the first priority).

  • Comment on Re^2: Philosophical question about testing

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://868367]
[Discipulus]: ah! ++choroba for seek $FH, $. = 0, 0;
[Discipulus]: anyway I lost 15 minutes with lc $str used by me instead of $str = lc $str

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2017-06-26 11:19 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (577 votes). Check out past polls.