Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Testing Non-module code

by dragonchild (Archbishop)
on Mar 16, 2004 at 13:18 UTC ( #336992=note: print w/replies, xml ) Need Help??

in reply to Testing Non-module code

Well, your code is probably organized into subroutines with some defined set of inputs and outputs, right? So, test those subroutines! Create a set of sample inputs and expected outputs. (This is a good way to help decouple your subroutines, too.)

Remember - testing an object still involves testing a bunch of subroutines. Yeah, there's some state and it can be easier to envision it, but it's still just a bunch of subroutines.

If you're dealing with testing scripts and the like, I'd point you to Test::Cmd and Test::Cmd::Common.

We are the carpenters and bricklayers of the Information Age.

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://336992]
[james28909]: thanks
[james28909]: what i am trying to do is track state of a chat based application. i need to be able to store the channels and such for a user, and when they join a new server/channel i need to be able to update that feild.
[james28909]: do you think OO would best suite that?
[karlgoethebier]: james28909: The last two are not mainstream. You have been warned ;-)

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (11)
As of 2017-05-25 16:31 GMT
Find Nodes?
    Voting Booth?