Previous Page
Next Page

B.17. Chapter 18, Testing and Debugging

  • Write the test cases first. [Test Cases]

  • Standardize your tests with Test::Simple or Test::More. [Modular Testing]

  • Standardize your test suites with Test::Harness. [Test Suites]

  • Write test cases that fail. [Failure]

  • Test both the likely and the unlikely. [What to Test]

  • Add new test cases before you start debugging. [Debugging and Testing]

  • Always use strict. [Strictures]

  • Always turn on warnings explicitly. [Warnings]

  • Never assume that a warning-free compilation implies correctness. [Correctness]

  • Turn off strictures or warnings explicitly, selectively, and in the smallest possible scope. [Overriding Strictures]

  • Learn at least a subset of the perl debugger. [The Debugger]

  • Use serialized warnings when debugging "manually". [Manual Debugging]

  • Consider using "smart comments" when debugging, rather than warn statements. [Semi-Automatic Debugging]

    Previous Page
    Next Page