in reply to adding control
Yum. Multi-page switch statements. I thing you need to break your code up into smaller routines, test those routines and then call the routines from your switch statement. This gets the 'do' part of the code separate from the 'which' part of the code. This would allow you to stub out the subroutines and just exercise your switch logic.
I'd also like to see all the sql statements defined ... I don't know, elsewhere? SQL is not my strong point and I find it difficult to read perl code having to skip over multi-line SQL command strings every other line.
On your Open() and CreateObject() calls you need to check if the calls succeed before proceeding. You could be working with invalid object references.
|
|---|