Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: A brief question about testing/best practices

by davido (Cardinal)
on Jan 20, 2015 at 17:15 UTC ( #1113904=note: print w/replies, xml ) Need Help??


in reply to A brief question about testing/best practices

The right honorable David Wheeler said it best: "All problems in computer science can be solved by another level of indirection, except of course for the problem of too many indirections."

Put everything into subroutines or methods. This even includes taking user input. If you can add a layer of abstraction around the while( <> ) {... then you can mock input by substituting your own version of that abstraction, for example.


Dave

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2021-01-16 23:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?