With "ol' procedural code" do you mean collections of functions in .pl files or standalone scripts? If you mean the first, then you can do normal Test::* tests, just require the file instead use'ing it. In the second case you may consider to convert the script into a hybrid script/module --- this is not too hard, just move the running part below a
return 1 if caller;
line. Now you can require the file and test the subroutines in it without running the script. If you don't have subroutines at all, then you can still check for side effects (e.g. created or changed files, or screen output). If the script is interactive, then you could consider to use Expect.pm.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||