in reply to Testing Perl files rather than modules
From the docs:
do FILEThe do FILE form uses the value of FILE as a filename and executes the contents of the file as a Perl script.
So, if your script has a number of subroutines, you include these in your test-script and can test them.
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
|
|---|