in reply to Testing Perl files rather than modules
When I have this type of quandary, I simplify it. I put all my subs into a module, leaving a shell of a script to call it, and then I can use Test::More. In fact, with the CB stats, most of my cron jobs are as simple as "perl -MMy::Module -e 'My::Module::do_stuff()'" I've put all my real functionality into the modules, and the "programs" that get run are simply calls into the module. Real simple. It's even come in handy in that when I go to actually create the stats, I can ensure that all the data is there just by calling those same routines again, just to be sure. It's like calling system("otherprog"), but faster (because I share the same database handle).
|
|---|