Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: How to unit test a script packaged in a module distribution?

by eyepopslikeamosquito (Archbishop)
on Apr 28, 2007 at 06:51 UTC ( [id://612512]=note: print w/replies, xml ) Need Help??


in reply to How to unit test a script packaged in a module distribution?

Chapter 9 of the excellent book Perl Testing: A Developer's Notebook contains an interesting tactical trick to better structure scripts for testability. Their idea is to have a one-line script mainline that calls a main() function; that way you can test the script more easily from outside by hooking into the script's main() function. If you are seriously interested in Perl testing, I strongly recommend getting this book.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-04-20 05:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found